Posted August 2, 20187 yr 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..
August 2, 20187 yr 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. 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.
August 2, 20187 yr Author 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
August 2, 20187 yr @MrPablo2000 All of your assets except for your lang file which has some legacy code needs to be in all lower case. 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.
August 2, 20187 yr 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, 20187 yr by V0idWa1k3r
August 2, 20187 yr Author Thanks - now works the block texture, but in hand block still is purple-black squares... Edited August 2, 20187 yr by MrPablo2000
August 2, 20187 yr Just now, MrPablo2000 said: Thanks - now works the block texture, but in blocks still is purple-black squares... Do you have a ModelRegistryEvent setup? 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.
August 2, 20187 yr 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 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.
August 3, 20187 yr 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. 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.
August 3, 20187 yr Author 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)); } }
August 3, 20187 yr 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? 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.
August 3, 20187 yr Author 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"); } }
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.