Posted March 30, 20178 yr Is there any way to skip the tile part of the unlocalized name that i get from public BlockMetadataBase(String name) { super(Material.IRON); this.name = name; setUnlocalizedName(name); setRegistryName(name); } I'm making my mod for 1.10.2 if that's relevant. Edited March 30, 20178 yr by Lgk
March 30, 20178 yr Author Just now, diesieben07 said: No idea what you are talking about. You should almost never call getUnlocalizedName. Well the problem is simply that my blockstate json will have to be called tile.blocks.json or something like that. And when I'm editing recipes in minetweaker I'll have to type extrastuff:tile.blocks:0, extrastuff:tile.blocks:1 etc.
March 30, 20178 yr Author The problem is that I'm not sure where I passed that name. Here's my ModBlocks.java class. Maybe it's not necessary, I'm puzzled. public class ModBlocks { public static BlockMetadataBase blocks; public static void init() { blocks = register(new BlockMetadataBase("blocks")); } private static <T extends Block> T register(T block, ItemBlock itemBlock) { GameRegistry.register(block); GameRegistry.register(itemBlock); if (block instanceof BlockMetadataBase) { ((BlockMetadataBase)block).registerItemModel(itemBlock); ((BlockMetadataBase)block).registerBakeryVariants(); } return block; } private static <T extends Block> T register(T block) { ItemBlock itemBlock = new ItemBlockMetadataBase(block); itemBlock.setRegistryName(block.getUnlocalizedName()); return register(block, itemBlock); }
March 31, 20178 yr https://github.com/MinecraftForge/MinecraftForge/blob/1.11.x/src/main/java/net/minecraftforge/fml/common/registry/IForgeRegistryEntry.java#L37-L38 I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
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.