kroist
Members-
Posts
2 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
kroist's Achievements
Tree Puncher (2/8)
0
Reputation
-
Okay, I just deleted everything and rewrited, and it started working.
-
Hey guys, So I am a total newbie to minecraft modding. And I am trying to make my first "test mod". I am making an item now. The problem is, that the item texture doesn't appear in game. I tried to find bug, but everything seems okay. I would be really grateful if somebody helps me. That's github project :https://github.com/kroist/micromod This is my items registering class public class ItemsRegister { public static Item KEY = new ItemKey("roflan"); public static void register(){ setRegister(KEY); } @SideOnly(Side.CLIENT) public static void registerRender(){ setRender(KEY); } private static void setRegister(Item item){ GameRegistry.register(item); } @SideOnly(Side.CLIENT) private static void setRender(Item item){ ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } json file { "parent": "item/generated", "textures": { "layer0": "micromod:items/roflan" } } That's the class for item public class ItemKey extends Item { public ItemKey(String name){ this.setRegistryName(name); this.setUnlocalizedName(name); this.setCreativeTab(Mod1.tabEmotes); } } CommonProxy and ClientProxy public class CommonProxy { public void preInit(FMLPreInitializationEvent event){ ItemsRegister.register(); } public void init(FMLInitializationEvent event){ } public void postInit(FMLPostInitializationEvent event){ } } public class ClientProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent event){ super.preInit(event); } @Override public void init(FMLInitializationEvent event){ super.init(event); ItemsRegister.registerRender(); } @Override public void postInit(FMLPostInitializationEvent event){ super.postInit(event); } }