July 8, 20178 yr It says blocks and Nuke is capitalized. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr That's because there is no model in models/blocks/, change it to { "parent": "nm:block/nuke" } Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
July 8, 20178 yr Author Just now, Kokkie said: That's because there is no model in models/blocks/, change it to { "parent": "nm:block/nuke" } I did, same result
July 8, 20178 yr Can you show a picture of all the files? Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
July 8, 20178 yr Is there anything in the console? And just to clarify the only problem is with the item? If so show where you register the model in code. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author 1 minute ago, Animefan8888 said: Is there anything in the console? And just to clarify the only problem is with the item? If so show where you register the model in code. Nothing in the console, here is the riegister: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(MyMod.MODID, block.getUnlocalizedName().substring(5)), "inventory"));
July 8, 20178 yr Instead of using 'modid', block.getUnlocalizedName().substring just use block.getRegistryName() which should be lower case anyways. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author 4 minutes ago, Animefan8888 said: Instead of using 'modid', block.getUnlocalizedName().substring just use block.getRegistryName() which should be lower case anyways. I get the error: The constructor ResourceLocation(ResourceLocation, String) is undefined. I have: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(block.getRegistryName(), "inventory"));
July 8, 20178 yr block.getRegistryName returns a ResourceLocation so you don't do new ResourceLocation(block.getRegistryName) VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author 2 minutes ago, Animefan8888 said: block.getRegistryName returns a ResourceLocation so you don't do new ResourceLocation(block.getRegistryName) So this?: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation((block.getRegistryName()), "inventory"));
July 8, 20178 yr That works, but why are there parenthesis around the block.getRegistryName() (Uneeded) VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author 2 minutes ago, Animefan8888 said: That works, but why are there parenthesis around the block.getRegistryName() (Uneeded) like this?: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));
July 8, 20178 yr Yes, the other one would have worked just as well, but the parenthesis did not need to be there. How much experience do you have with Java? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author Just now, Animefan8888 said: Yes, the other one would have worked just as well, but the parenthesis did not need to be there. How much experience do you have with Java? Still nothing
July 8, 20178 yr Where are you calling ModelLoader.set...? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr You are using Item.getItemFromBlock(block) but you should use new ItemBlock(block)... Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
July 8, 20178 yr 1 minute ago, Kokkie said: You are using Item.getItemFromBlock(block) but you should use new ItemBlock(block)... No that is wrong. Using new ItemBlock(block) would use an unregistered Item and the real Item would have a model. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Author 43 minutes ago, Animefan8888 said: Where are you calling ModelLoader.set...? under registerRender public static void registerRender(Block block){ ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } } which I call under ClientProxy Edited July 8, 20178 yr by funsize888
July 8, 20178 yr Where does that get called from? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 8, 20178 yr Show your ClientProxy code Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
July 8, 20178 yr Your ClientProxy. And where do you register your block. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.