Résolu TileEntityRender
-
Bonjour je suis en train de créer un cable ( qui conduit l’electricité )
dans la classe TileEntityRenderPipe
j’ai :ResourceLocation texture = new ResourceLocation(Robotic.modid, "textures/model/pipe.png");
Robotic.modid doit renvoyer au modid de mon mod a savoir roboticmod mais modid ne se met pas en bleu il reste rouge et je n’arrive pas a savoir pourquoi
ma classe principale :
package com.bowser.robotic.common; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import com.bowser.robotic.proxy.CommonProxy; 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.registry.GameRegistry; @Mod(modid = "roboticmod", name = "Mod Robotic", version = "1.0.0") public class Robotic { @Instance("modrobotic") public static Robotic instance; @SidedProxy(clientSide = "com.bowser.robotic.proxy.ClientProxy", serverSide = "com.bowser.robotic.proxy.CommonProxy") public static CommonProxy proxy; //blocks public static Block cuivreOre; public static Block blockCable; //items public static Item copperIngot; @EventHandler public void preInit(FMLPreInitializationEvent event) { //Blocks cuivreOre = new OreCuivre(Material.rock).setBlockName("cuivreore").setBlockTextureName("roboticmod:orecuivre").setCreativeTab(CreativeTabs.tabBlock).setHardness(3.0F).setResistance(5.0F); GameRegistry.registerBlock(cuivreOre, "block_cuivre"); blockCable = new BlockElectricCable().setBlockName("blockPipe").setCreativeTab(CreativeTabs.tabBlock); GameRegistry.registerBlock(blockCable, "block_cable"); //items copperIngot = new CopperIngot().setUnlocalizedName("copperingot").setTextureName("roboticmod:copperingot").setCreativeTab(CreativeTabs.tabMaterials); GameRegistry.registerItem(copperIngot, "copper_ingot"); //recipe furnace basic GameRegistry.addSmelting(cuivreOre, new ItemStack(copperIngot, 1), 0f); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); //generator GameRegistry.registerWorldGenerator(new WorldGeneratorCopper(), 0); GameRegistry.registerTileEntity(TileEntityPipe.class, "Pipe"); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
-
Peut-être parce que tu n’as aucunes variables qui s’appellent modid dans ta class Robotic.
Perso je fais comme ça :
@Mod(modid = Main.MODID, name = "Veberisation", version = "0.0.1") public class Main{ public static final String MODID = "veberisation"; @Instance(MODID) public static Main instance; …..
J’espère que ça peut aider.
Vebert -
Merci ! j’avais effectivement pas mis sa comme sa du coup sa ne marchait pas