MrPablo2000 Posted August 2, 2018 Share Posted August 2, 2018 Hi, I want to make my block in 1.12.2, I'm doing all as in this film: But it doesn't working... That's my eclipse log: https://pastebin.com/1VuggbGC Thanks for help.. Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 2, 2018 Share Posted August 2, 2018 1 minute ago, MrPablo2000 said: That's my eclipse log: This says your BlockState file is missing the normal variant. Please post your code and your jsons. Quote 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. Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 2, 2018 Author Share Posted August 2, 2018 JSON in assets.lanterns.blockstates: https://pastebin.com/VCc8VMu4 JSON in assets.lanterns.models.block: https://pastebin.com/5c8DyEjU JSON in assets.lanterns.models.item: https://pastebin.com/VCJwenGE Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 2, 2018 Share Posted August 2, 2018 @MrPablo2000 All of your assets except for your lang file which has some legacy code needs to be in all lower case. Quote 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. Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted August 2, 2018 Share Posted August 2, 2018 (edited) Caused by: java.io.FileNotFoundException: lanterns:blockstates/orz1_off.json Is your blockstates file named orz1_off.json? Make sure it is lowercase - all asset names must be entirely lowercase(I see that your blockstates file references the model with upper-case letters in it's name - that won't work) Edited August 2, 2018 by V0idWa1k3r Quote Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 2, 2018 Author Share Posted August 2, 2018 (edited) Thanks - now works the block texture, but in hand block still is purple-black squares... Edited August 2, 2018 by MrPablo2000 Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 2, 2018 Share Posted August 2, 2018 Just now, MrPablo2000 said: Thanks - now works the block texture, but in blocks still is purple-black squares... Do you have a ModelRegistryEvent setup? Quote 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. Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 2, 2018 Author Share Posted August 2, 2018 Yes, in RegistryHandler: https://pastebin.com/rhwEmsWg Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 2, 2018 Share Posted August 2, 2018 13 minutes ago, MrPablo2000 said: Yes, in RegistryHandler: OK, first off Code Style Issue #3 And I need to see where you call ModelLoader.setCustomModelResourceLocation Quote 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. Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 3, 2018 Author Share Posted August 3, 2018 Oh, I forgot about this...Where I must call it ? Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2018 Share Posted August 3, 2018 Just now, MrPablo2000 said: Oh, I forgot about this...Where I must call it ? The proper way to do it is in your ModelRegistryEvent or in a wrapper method in your ClientProxy. All Items have a model so there is no reason to have an IHasModel or have the ModelLoader.setCustomModelResourceLocation in your Items class. Especially since most Items will have a single model registered to them. Quote 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. Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 3, 2018 Author Share Posted August 3, 2018 I wrote it to my mod, but it still doesn't work: package com.mrpablo2000.lanterns.network; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends CommonProxy{ public static void registerItemRenderers(Item item, int meta, String id) { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id)); } } Quote Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 3, 2018 Share Posted August 3, 2018 3 minutes ago, MrPablo2000 said: I wrote it to my mod, but it still doesn't work: Are you calling that method in your ModelRegistryEvent for your item? Quote 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. Link to comment Share on other sites More sharing options...
MrPablo2000 Posted August 3, 2018 Author Share Posted August 3, 2018 Are you thinking about this? package com.mrpablo2000.lanterns.blocks; import com.mrpablo2000.lanterns.Lanterns; import com.mrpablo2000.lanterns.items.ModItems; import com.mrpablo2000.lanterns.util.IHasModel; 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.ItemBlock; public class BlockORZ1 extends Block implements IHasModel { public static boolean isActive; public BlockORZ1(String name, boolean isActive ) { super(Material.IRON); this.isActive=isActive; this.setUnlocalizedName(name); this.setRegistryName(name); this.setCreativeTab(CreativeTabs.REDSTONE); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); } public void registerModels() { Lanterns.proxy.registerItemRenderers(Item.getItemFromBlock(this), 0, "inventory"); } } Quote Link to comment Share on other sites More sharing options...
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.