Posted January 6, 20187 yr I am new to modding and have been learning from this tutorial. I am unable to render the texture or the model properly. Github: https://github.com/karrablaster123/Mod Relevant Code: Spoiler public class blockUranium extends Block { public blockUranium () { super(Material.ROCK); setUnlocalizedName(Reference.MODID + ".blockUranium"); setRegistryName("blockUranium"); } @SideOnly(Side.CLIENT) public void initModel() { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory")); } } All required classes have been imported. No errors displayed by eclipse { "forge_marker": 1, "defaults": { "model": "km:blockUranium" }, "variants": { "normal": [{}], "inventory": [{}] } } { "parent": "block/cube_all", "textures": { "all": "km:blocks/blockUranium" } } public class allBlocks { @GameRegistry.ObjectHolder("km:blockUranium") public static blockUranium blockUranium; @SideOnly(Side.CLIENT) public static void initModels() { blockUranium.initModel(); } } The initmodel function is being called in the CommonProxy class within the Preinit function Edited January 6, 20187 yr by karrablaster123
January 6, 20187 yr Author I fixed it by changing blockUranium to blockuranium. Do registry names not allow capital letters?
January 7, 20187 yr Author 8 hours ago, diesieben07 said: Correct. Registry names and asset file names must be all lowercase. Thanks
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.