VikingIwan Posted June 10, 2016 Posted June 10, 2016 Can someone please take a look at my code, and tell me why the texture for my cage_block doesn't show up (aka: i get the purple and black missing texture) in the inventory or in my hand, but when I place it, the texture works perfectly fine? The code is in my github: https://github.com/vikingiwan/not-the-bees/tree/master/src/main/java/com/vikingiwan/ntbMod Quote
Choonster Posted June 10, 2016 Posted June 10, 2016 The FML log should tell you what went wrong when loading the model. If you don't know what to make of it, upload the log to Gist and link it here. There are several issues with your code: Don't use the deprecated GameRegistry.registerBlock / registerItem methods, use GameRegistry.register . This requires you to register an ItemBlock for your Block instead of doing it for you. Don't use unlocalised names for registry names. The whole point of the registry name methods being added in 1.8.9 was to stop people from doing that. Set your registry names in your Item constructors. If the Item class is used by multiple instances, take the registry name as a constructor argument. If the Item class in only used by one instance, you can hardcode the registry name in the constructor. If your registry and unlocalised names are the same, I recommend setting the registry name ( setRegistryName("myItem") ) and then setting the unlocalised name to the full registry name ( setUnlocalizedName(getRegistryName()) ). This will result in your item's full unlocalised name being item.modid:myItem.name , which includes your mod ID to avoid conflicts with other mods. Don't use ItemModelMesher#register to register models, use ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition in preInit. You're using an internal class from Jline for your logging, this is a bad idea. Use FMLPreInitializationEvent#getModLog to get a Logger with your mod ID as its name, then use this for logging. Your @Mod class is in the client package, but it's not a client-only class. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.