Model
-
Voila je vien vous presenté un de mes probléme avec le model (ses pour un block de noix de coco)
alor quand je place le block sa me met un block invisible
Taille du model: 64x32http://image.noelshack.com/fichiers/2016/21/1464116539-2016-05-24-21-01-47.png
ModelCoco
package fr.impuuu.havenrp.models; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelCoco extends ModelBase { //fields ModelRenderer toiture; ModelRenderer cote4; ModelRenderer cote1; ModelRenderer cote2; ModelRenderer cote3; ModelRenderer sol; public ModelCoco() { textureWidth = 64; textureHeight = 32; toiture = new ModelRenderer(this, 0, 0); toiture.addBox(0F, 0F, 0F, 14, 1, 14); toiture.setRotationPoint(-7F, 8F, -7F); toiture.setTextureSize(64, 32); toiture.mirror = true; setRotation(toiture, 0F, 0F, 0F); cote4 = new ModelRenderer(this, 0, 0); cote4.addBox(0F, 0F, 0F, 14, 14, 1); cote4.setRotationPoint(-7F, 9F, -8F); cote4.setTextureSize(64, 32); cote4.mirror = true; setRotation(cote4, 0F, 0F, 0F); cote1 = new ModelRenderer(this, 0, 0); cote1.addBox(0F, 0F, 0F, 14, 14, 1); cote1.setRotationPoint(-7F, 9F, 7F); cote1.setTextureSize(64, 32); cote1.mirror = true; setRotation(cote1, 0F, 0F, 0F); cote2 = new ModelRenderer(this, 0, 0); cote2.addBox(0F, 0F, 0F, 1, 14, 14); cote2.setRotationPoint(-8F, 9F, -7F); cote2.setTextureSize(64, 32); cote2.mirror = true; setRotation(cote2, 0F, 0F, 0F); cote3 = new ModelRenderer(this, 0, 0); cote3.addBox(0F, 0F, 0F, 1, 14, 14); cote3.setRotationPoint(7F, 9F, -7F); cote3.setTextureSize(64, 32); cote3.mirror = true; setRotation(cote3, 0F, 0F, 0F); sol = new ModelRenderer(this, 0, 0); sol.addBox(0F, 0F, 0F, 14, 1, 14); sol.setRotationPoint(-7F, 23F, -7F); sol.setTextureSize(64, 32); sol.mirror = true; setRotation(sol, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); toiture.render(f5); cote4.render(f5); cote1.render(f5); cote2.render(f5); cote3.render(f5); sol.render(f5); } public void renderModel(float f5) { cote4.render(f5); cote1.render(f5); cote2.render(f5); cote3.render(f5); sol.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } }
TileEntityCoco
package fr.impuuu.havenrp.titleentity; import net.minecraft.tileentity.TileEntity; public class TileEntityCoco extends TileEntity { }
RenderCoco
package fr.impuuu.havenrp.render; import org.lwjgl.opengl.GL11; import fr.impuuu.havenrp.common.HavenRP; import fr.impuuu.havenrp.models.ModelCoco; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class RenderCoco extends TileEntitySpecialRenderer { ResourceLocation texture = new ResourceLocation(HavenRP.MODID + ":" + "textures/models/coco.png"); private ModelCoco model; public RenderCoco (){ this.model = new ModelCoco(); } @Override public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float i) { GL11.glPushMatrix(); GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); GL11.glRotatef(180, 0F, 0F, 1F); this.bindTexture(texture); GL11.glPushMatrix(); this.model.renderModel(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } }
cocoBlock
package fr.impuuu.havenrp.block; import fr.impuuu.havenrp.common.HavenRP; import fr.impuuu.havenrp.titleentity.TileEntityCoco; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class CocoBlock extends Block { public CocoBlock(Material material) { super(material); this.setCreativeTab(HavenRP.tabHavenRP); this.setHardness(5.0F); } public int getRenderType(){ return -1; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } public TileEntity createTileEntity(World world, int metadata) { return new TileEntityCoco(); } }
ClientProxy
public void registerRenderThings(){ TileEntitySpecialRenderer render = new RenderCoco(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoco.class, render); }
-
Je pense pas que c’est sa mais dans ton render ajoute sa:
protected ResourceLocation getEntityTexture(Entity entity) { return texture; }
-
Salut,
Vérifies que ta fonction registerRenderThings est appelé. -
regarde mon client proxy avec les event_bus
public ClientProxy(){ MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this); } public void registerRenderThings(){ TileEntitySpecialRenderer render = new RenderCoco(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoco.class, render); } ``` Ses peut être a cause des dimension ses du 64X32
-
Non. Dans ta classe principale est-ce qu’il y a la ligne «proxy.registerRenderThings» dans la fonction init ?
-
NN mais si je la mais sa fait une erreur mais j ai un proxy.registerRender
-
@‘impuuu’:
NN mais si je la mais sa fait une erreur mais j ai un proxy.registerRender
Ta bien mis comme sa [font=Ubuntu, sans-serifproxy.registerRenderThings();]
[font=Ubuntu, sans-serifSinon faudrait que tu donne l’erreur sa serrai plus simple]
[font=Ubuntu, sans-serifPour t’expliquer proxy.registerRender]
[font=Ubuntu, sans-serifsert a enregistrer ]
[font=Ubuntu, sans-serif@Override ] public void registerRenders() { [font=Ubuntu, sans-serif}]
[font=Ubuntu, sans-serifMais toi ta ajouté ]
[font=Ubuntu, sans-serif@][font=Ubuntu, sans-serifOverride] [font=Ubuntu, sans-serifpublic void registerRenderThings]() [font=Ubuntu, sans-serif{] [font=Ubuntu, sans-serif}]
[font=Ubuntu, sans-serifDonc il faut l’enregistré aussi]
[font=Ubuntu, sans-serifEt puis je croie qui faut l’ajouter dans les CommonProxy aussi pas sur][font=Ubuntu, sans-serif```java
@][font=Ubuntu, sans-serifOverride]%(#333333)[font=Ubuntu, sans-serif]public void registerRenderThings
[font=Ubuntu, sans-serif{]
[font=Ubuntu, sans-serif}]
-
Sa me dit cree méthode ou cast proxy
-
La méthode doit aussi exister dans la classe common proxy.
-
@‘impuuu’:
Dame dit créateur méthode ou cast proxy
Comme je te les dit plus haut essaye de le mettre dans les CommonProxy aussi
[font=Ubuntu, sans-serif@][font=Ubuntu, sans-serifOverride] [font=Ubuntu, sans-serifpublic void registerRenderThings]() [font=Ubuntu, sans-serif{] [font=Ubuntu, sans-serif}]
-
Oui sa me dit de créé UNE method dans common proxy
-
@‘impuuu’:
Oui sa me dit de créé UNE method dans common proxy
Fait le
-
Je la laisse vide sa reste parreil
-
Oui
-
Sa reste pareille ces encore buggé
-
Envoies-nous ta classe principale + tes deux proxys.
-
OK demain la je peut pas
-
CommonProxy
package fr.impuuu.havenrp.proxy; public class CommonProxy { public void registerRender(){ System.out.println("Methode Coté serveur !"); } public void registerRenderThings() { } }
ClientProxy
package fr.impuuu.havenrp.proxy; import java.awt.Desktop; import java.io.IOException; import java.net.URI; import org.lwjgl.opengl.Display; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.SideOnly; import fr.impuuu.havenrp.render.RenderCoco; import fr.impuuu.havenrp.titleentity.TileEntityCoco; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.multiplayer.GuiConnecting; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.resources.I18n; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent; import net.minecraftforge.common.MinecraftForge; public class ClientProxy extends CommonProxy { public ClientProxy(){ MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this); } public void registerRenderThings(){ TileEntitySpecialRenderer render = new RenderCoco(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoco.class, render); } @SubscribeEvent public void onInitGuiEvent(InitGuiEvent.Post event) { if (event.gui instanceof GuiMainMenu) { // On regarde si le gui est bien le menu principal for (Object b : event.buttonList) { // On parcourt la liste des boutons if (((GuiButton) b).id == 14) { // Si c'est le bouton "Minecraft Realms" (qui a l'ID 14) ((GuiButton) b).visible = false; // On ne l'affiche plus } if(((GuiButton) b).id == 6){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 1){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 0){ ((GuiButton) b).visible = false ; } if(((GuiButton) b).id == 2){ ((GuiButton) b).visible = false ; } if(((GuiButton) b).id == 5){ ((GuiButton) b).visible = false ; } if(((GuiButton) b).id == 4){ ((GuiButton) b).visible = false ; } } int i = event.gui.height / 4 + 48; // On définit une variable pour simplifier le code (elle est utilisée par Minecraft) event.buttonList.add(new GuiButton(130, event.gui.width / 2 - 100, i + 24 * 2, 200, 20, EnumChatFormatting.GRAY+"Teamspeak") { // On crée un bouton avec l'ID 30 de 100 de large et 20 de large appelé "Teamspeak" @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique if (Desktop.isDesktopSupported()) { // Si on peut utiliser des URIs try { Desktop.getDesktop().browse(new URI("ts3server://212.83.151.173?port=10614")); // On essaye de lancer TeamSpeak } catch (Exception e) { e.printStackTrace(); } } } }); event.buttonList.add(new GuiButton(31, event.gui.width / 2 - 100, i + 72, 200, 20, EnumChatFormatting.BLUE+"Site") { // On crée un bouton avec l'ID 30 de 100 de large et 20 de large appelé "Teamspeak" @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique if (Desktop.isDesktopSupported()) { // Si on peut utiliser des URIs try { Desktop.getDesktop().browse(new URI("http://havenrp-v2.livehost.fr/")); // On essaye de lancer TeamSpeak } catch (Exception e) { e.printStackTrace(); } } } }); event.buttonList.add(new GuiButton(1, event.gui.width / 2 - 100, i + 0 * 2, 200, 20, EnumChatFormatting.DARK_AQUA+"Options") { // On crée un bouton avec l'ID 30 de 100 de large et 20 de large appelé "Teamspeak" @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique } }); event.buttonList.add(new GuiButton(31, event.gui.width / 2 - 100, i + 12 * 2, 200, 20, EnumChatFormatting.DARK_RED+""+EnumChatFormatting.OBFUSCATED+"11"+EnumChatFormatting.RED+""+EnumChatFormatting.BOLD+"HavenRP"+EnumChatFormatting.DARK_RED+""+EnumChatFormatting.OBFUSCATED+"11" ) { // On crée un bouton avec l'ID 30 de 100 de large et 20 de large appelé "Teamspeak" @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique FMLClientHandler.instance().connectToServerAtStartup("MineLifeRP.crystal-serv.com", 25790); } }); ObfuscationReflectionHelper.setPrivateValue(GuiMainMenu.class, (GuiMainMenu) event.gui, EnumChatFormatting.GOLD+"HavenRP :)", "splashText", "field_73975_c"); } } @SubscribeEvent public void InitGuiEvent(InitGuiEvent.Post e) { if(e.gui instanceof GuiIngameMenu){ for(Object b : e.buttonList){ if(((GuiButton) b).id == 1){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 12){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 7){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 5){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 6){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 4){ ((GuiButton) b).visible = false; } if(((GuiButton) b).id == 0){ ((GuiButton) b).visible = false; } } byte b0 = -16; e.buttonList.add(new GuiButton(4, e.gui.width / 2 - 100, e.gui.height / 4 + 24 + b0, 200, 20, EnumChatFormatting.DARK_RED+""+EnumChatFormatting.OBFUSCATED+"11"+EnumChatFormatting.RED+""+EnumChatFormatting.BOLD+"Retour au jeu"+EnumChatFormatting.DARK_RED+""+EnumChatFormatting.OBFUSCATED+"11") { @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique } }); e.buttonList.add(new GuiButton(0, e.gui.width / 2 - 100, e.gui.height / 4 + 48 + b0, 200, 20, EnumChatFormatting.DARK_AQUA+"Options") { @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique } }); e.buttonList.add(new GuiButton(40, e.gui.width / 2 - 100, e.gui.height / 4 + 72 + b0, 200, 20, EnumChatFormatting.GRAY+"Teamspeak 3"){ @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("ts3server://212.83.151.173?port=10614")); // On essaye de lancer TeamSpeak } catch (Exception e) { e.printStackTrace(); } } } }); e.buttonList.add(new GuiButton(41, e.gui.width / 2 - 100, e.gui.height / 4 + 96 + b0, 200, 20, EnumChatFormatting.BLUE+"Site"){ @Override public void mouseReleased(int x, int y) { // Lorsque l'on clique if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("http://havenrp-v2.livehost.fr/")); // On essaye de lancer TeamSpeak } catch (Exception e) { e.printStackTrace(); } } } }); } } }
Classe Principale
package fr.impuuu.havenrp.common; import java.io.InputStream; import java.nio.ByteBuffer; import org.lwjgl.opengl.Display; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import fr.impuuu.havenrp.block.BlockPomme; import fr.impuuu.havenrp.block.ClayStairs; import fr.impuuu.havenrp.block.CocoBlock; import fr.impuuu.havenrp.block.Plante; import fr.impuuu.havenrp.proxy.CommonProxy; @Mod(modid = "havenrp", name = "HavenRP", version ="2.0") public class HavenRP { private static final ResourceLocation icon = new ResourceLocation("havenrp", "textures/icon/icon.png"); public static final String MODID = "havenrp"; @Instance(MODID) public static HavenRP instance; public static final Block.SoundType soundTypeGrass = new Block.SoundType("grass", 1.0F, 1.0F); @SidedProxy(clientSide = "fr.impuuu.havenrp.proxy.ClientProxy", serverSide = "fr.impuuu.havenrp.proxy.CommonProxy") public static CommonProxy proxy; public static Item item5; public static Item item10; public static Item item20; public static Item item50; public static Item item100; public static Item item200; public static Item item500; public static Item itemFer; public static Item itemPomme; /*Block*/ public static Block BlockPomme, white_clay_stairs, orange_clay_stairs, magenta_clay_stairs, light_blue_clay_stairs, yellow_clay_stairs, lime_clay_stairs , pink_clay_stairs, gray_clay_stairs, light_gray_clay_stairs , cyan_clay_stairs, purple_clay_stairs, blue_clay_stairs, brown_clay_stairs, green_clay_stairs, red_clay_stairs, black_clay_stairs; public static Block Plante_cannabis; public static Block Plante_mari; public static Block Block_Coco; @EventHandler public void preInit(FMLPreInitializationEvent event) { item5 = new Item5().setUnlocalizedName("5").setTextureName(MODID+":billet_5").setCreativeTab(tabHavenRP); item10 = new Item10().setUnlocalizedName("10").setTextureName(MODID+":billet_10").setCreativeTab(tabHavenRP); item20 = new Item20().setUnlocalizedName("20").setTextureName(MODID+":billet_20").setCreativeTab(tabHavenRP); item50 = new Item50().setUnlocalizedName("50").setTextureName(MODID+":billet_50").setCreativeTab(tabHavenRP); item100 = new Item100().setUnlocalizedName("100").setTextureName(MODID+":billet_100").setCreativeTab(tabHavenRP); item200 = new Item200().setUnlocalizedName("200").setTextureName(MODID+":billet_200").setCreativeTab(tabHavenRP); item500 = new Item500().setUnlocalizedName("500").setTextureName(MODID+":billet_500").setCreativeTab(tabHavenRP); itemFer = new itemFer().setUnlocalizedName("Fer").setTextureName(MODID+":Fer_ingot").setMaxStackSize(8).setCreativeTab(tabHavenRP); itemPomme = new ItemFood(4, 0.3F, false).setUnlocalizedName("Pomme").setTextureName(MODID+":Pomme_item").setMaxStackSize(16).setCreativeTab(tabHavenRP); /*Block*/ BlockPomme = new BlockPomme(Material.leaves).setBlockName("Blockdepomme").setBlockTextureName(MODID+":PommeBlock").setCreativeTab(tabHavenRP).setHardness(0.5F); Plante_cannabis = new Plante(Material.plants).setBlockName("Plante_Cannabis").setBlockTextureName(MODID+":Plante_Cannabis").setStepSound(soundTypeGrass).setCreativeTab(tabHavenRP).setHardness(0.4F); Plante_mari = new Plante(Material.plants).setBlockName("Plante_Mari").setBlockTextureName(MODID+":Plante_Mari").setStepSound(soundTypeGrass).setCreativeTab(tabHavenRP).setHardness(0.3F); Block_Coco = new CocoBlock(Material.leaves).setBlockName("Coco_Block").setBlockTextureName(MODID+":Coco_Block"); white_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 0).setBlockName("white_clay_stairs").setCreativeTab(tabHavenRP); orange_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 1).setBlockName("orange_clay_stairs").setCreativeTab(tabHavenRP); magenta_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 2).setBlockName("magenta_clay_stairs").setCreativeTab(tabHavenRP); light_blue_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 3).setBlockName("light_blue_clay_stairs").setCreativeTab(tabHavenRP); yellow_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 4).setBlockName("yellow_clay_stairs").setCreativeTab(tabHavenRP); lime_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 5).setBlockName("lime_clay_stairs").setCreativeTab(tabHavenRP); pink_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 6).setBlockName("pink_clay_stairs").setCreativeTab(tabHavenRP); gray_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 7).setBlockName("gray_clay_stairs").setCreativeTab(tabHavenRP); light_gray_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 8).setBlockName("light_gray_clay_stairs").setCreativeTab(tabHavenRP); cyan_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 9).setBlockName("cyan_clay_stairs").setCreativeTab(tabHavenRP); purple_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 10).setBlockName("purple_clay_stairs").setCreativeTab(tabHavenRP); blue_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 11).setBlockName("blue_clay_stairs").setCreativeTab(tabHavenRP); brown_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 12).setBlockName("brown_clay_stairs").setCreativeTab(tabHavenRP); green_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 13).setBlockName("green_clay_stairs").setCreativeTab(tabHavenRP); red_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 14).setBlockName("red_clay_stairs").setCreativeTab(tabHavenRP); black_clay_stairs = new ClayStairs(Blocks.stained_hardened_clay, 15).setBlockName("black_clay_stairs").setCreativeTab(tabHavenRP); GameRegistry.registerItem(item5, "5€"); GameRegistry.registerItem(item10, "10€"); GameRegistry.registerItem(item20, "20€"); GameRegistry.registerItem(item50, "50€"); GameRegistry.registerItem(item100, "100€"); GameRegistry.registerItem(item200, "200€"); GameRegistry.registerItem(item500, "500€"); GameRegistry.registerItem(itemFer, "Fer"); GameRegistry.registerItem(itemPomme, "Pomme"); /*Block*/ GameRegistry.registerBlock(BlockPomme, "Block_de_Pomme"); GameRegistry.registerBlock(white_clay_stairs, "white_clay_stairs"); GameRegistry.registerBlock(orange_clay_stairs, "orange_clay_stairs"); GameRegistry.registerBlock(magenta_clay_stairs, "magenta_clay_stairs"); GameRegistry.registerBlock(light_blue_clay_stairs, "light_blue_clay_stairs"); GameRegistry.registerBlock(yellow_clay_stairs, "yellow_clay_stairs"); GameRegistry.registerBlock(lime_clay_stairs, "lime_clay_stairs"); GameRegistry.registerBlock(pink_clay_stairs, "pink_clay_stairs"); GameRegistry.registerBlock(gray_clay_stairs, "gray_clay_stairs"); GameRegistry.registerBlock(light_gray_clay_stairs, "light_gray_clay_stairs"); GameRegistry.registerBlock(cyan_clay_stairs, "cyan_clay_stairs"); GameRegistry.registerBlock(purple_clay_stairs, "purple_clay_stairs"); GameRegistry.registerBlock(blue_clay_stairs, "blue_clay_stairs"); GameRegistry.registerBlock(brown_clay_stairs, "brown_clay_stairs"); GameRegistry.registerBlock(green_clay_stairs, "green_clay_stairs"); GameRegistry.registerBlock(red_clay_stairs, "red_clay_stairs"); GameRegistry.registerBlock(black_clay_stairs, "black_clay_stairs"); GameRegistry.registerBlock(Plante_cannabis, "Plante_de_cannabis"); GameRegistry.registerBlock(Plante_mari, "Plante_de_marijuana"); GameRegistry.registerBlock(Block_Coco, "Block_de_coco"); } @EventHandler public void init(FMLInitializationEvent event) { FMLCommonHandler.instance().bus().register(this); proxy.registerRender(); proxy.registerRenderThings(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } public static CreativeTabs tabHavenRP = new CreativeTabs("HavenRP"){ @Override public Item getTabIconItem(){ return new ItemStack(item500).getItem(); } }; /* @SubscribeEvent @SideOnly(Side.CLIENT) public void onTick(TickEvent.ClientTickEvent event) { Minecraft mc = FMLClientHandler.instance().getClient(); if(mc.currentScreen != null && mc.currentScreen.getClass().equals(GuiMainMenu.class)) { mc.displayGuiScreen(new GuiCustomMainMenu()); } } */ }
-
Eclipse te met quoi comme erreur (et où) ?
-
Ton code est bon, il ne devrait pas avoir d’erreur.