Jump to content

Ferrettomato

Members
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Ferrettomato

  1. I'm attempting to create a TileEntity (for the first time), but apparently the TileEntity class no longer contains the updateEntity() method. I can't find information anywhere on why this is or what I can use in its place. Could anyone shed some light on this? Apologies if it's clearly posted somewhere or if I've made some unnoticeable typo, but I honestly don't know what's going on.
  2. Wait, never mind. I changed the renderType from 6 to 3 and that worked for some reason. Wuppy's book said 6, maybe it's changed since 1.7.10.
  3. I'm having trouble getting the texture to appear on a crop block called blightplant . Any stage, when placed in the world, has no texture whatsoever (completely transparent). In Item form, the texture is missing (purple and black cube), unless I comment out the ModelBakery line, in which case the first stage renders in the inventory but is still invisible when placed down. Files: Relevant init lines: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this.blightplant), 0, new ModelResourceLocation("ferret_myfirstmod:blightplant", "inventory")); ModelBakery.addVariantName(Item.getItemFromBlock(this.blightplant), new String[]{"ferret_myfirstmod:blightplant1", "ferret_myfirstmod:blightplant2", "ferret_myfirstmod:blightplant3"}); BlockBlightPlant class: package com.ferret.myfirstmod; import java.util.List; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.IGrowable; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.IStringSerializable; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBlightPlant extends BlockBush implements IGrowable { public static final PropertyEnum AGE = PropertyEnum.create("age", BlockBlightPlant.EnumType.class); public BlockBlightPlant() { super(Material.plants); setUnlocalizedName(MyFirstMod.MODID + "_" + "blightplant"); setCreativeTab(CreativeTabs.tabMisc); setHardness(0.0F); setBlockBounds(0F, 0.0F, 0F, 1F, 0.25F, 1F); setStepSound(soundTypeGrass); } @Override public int getRenderType() { return 6; } @SuppressWarnings({"unchecked", "rawtypes"}) @SideOnly(Side.CLIENT) @Override public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { for (int i = 0; i < 3; i++) { par3List.add(new ItemStack(par1, 1, i)); } } @Override public int damageDropped(IBlockState state) { return ((BlockBlightPlant.EnumType)state.getValue(AGE)).getMetadata(); } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(AGE, BlockBlightPlant.EnumType.byMetadata(meta)); } @Override public int getMetaFromState(IBlockState state) { return ((BlockBlightPlant.EnumType)state.getValue(AGE)).getMetadata(); } @Override protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {AGE}); } public static enum EnumType implements IStringSerializable { AGE1(0, "0"), AGE2(1, "1"), AGE3(2, "2"); private static final BlockBlightPlant.EnumType[] META_LOOKUP = new BlockBlightPlant.EnumType[values().length]; private final int meta; private final String name; private final String unlocalizedName; private EnumType(int meta, String name) { this(meta, name, name); } private EnumType(int meta, String name, String unlocalizedName) { this.meta = meta; this.name = name; this.unlocalizedName = unlocalizedName; } public int getMetadata() { return this.meta; } public String toString() { return this.name; } public static BlockBlightPlant.EnumType byMetadata(int meta) { if (meta < 0 || meta >= META_LOOKUP.length) { meta = 0; } return META_LOOKUP[meta]; } public String getName() { return this.name; } public String getUnlocalizedName() { return this.unlocalizedName; } static { BlockBlightPlant.EnumType[] var0 = values(); int var1 = var0.length; for (int var2 = 0; var2 < var1; ++var2) { BlockBlightPlant.EnumType var3 = var0[var2]; META_LOOKUP[var3.getMetadata()] = var3; } } } @Override public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient) { return getMetaFromState(state) != 2; } @Override public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, IBlockState state) { return true; } @Override public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { int next = getMetaFromState(state) + 1; if(next > 2) { next = 2; } worldIn.setBlockState(pos, getStateFromMeta(2)); } } blightplant.json (blockstate): { "variants": { "age=0": { "model": "ferret_myfirstmod:blightplant1" }, "age=1": { "model": "ferret_myfirstmod:blightplant2" }, "age=2": { "model": "ferret_myfirstmod:blightplant3" } } } blightplant1.json (block) (one for each stage): { "parent": "block/crop", "textures": { "crop": "ferret_myfirstmod:blocks/blightplant1" } } blightplant1.json (item) (one for each stage): { "parent": "ferret_myfirstmod:block/blightplant1", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } What can I change to get the textures to appear?
  4. I followed the steps in your troubleshooting guide, but I was unable to locate the problem. I receive the following errors when I run the game: -snip- I compared my JSONs to those in the MinecraftByExample project, and my blockstate JSON was completely wrong. After making the necessary changes, (and being foiled by the absence of a single comma for god knows how long) I got everything to work. Thanks a bunch! I'll make sure to check back on MBE for future issues.
  5. Thanks. One other question, is it possible to change the efficiency or damage of a tool based on the player's hunger level?
  6. I'm trying to make tools that repair themselves by draining the player's hunger. I tried using the Item's onUpdate method, but I can't add an EntityPlayer object to the parameters or it doesn't call the method. How can I do this? Item class (I've commented out the code involving EntityPlayer so it actually runs, but that's the code I want to use): package com.ferret.myfirstmod; import ibxm.Player; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.world.World; import net.minecraftforge.fml.common.registry.GameRegistry; public class ItemLightSword extends ItemSword { private final String name = "lightsword"; protected ItemLightSword(ToolMaterial material, String name) { super(material); setUnlocalizedName(MyFirstMod.MODID + "_" + name); } public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { if (stack.getItem() == MyFirstMod.lightsword) { if (stack.getItemDamage() > 0 /*&& player.getFoodStats().getFoodLevel() > 0*/) { //player.getFoodStats().addStats(-1, 0); stack.setItemDamage(stack.getItemDamage() - 1); System.out.println("Item repaired!"); } } } }
  7. Yes, see the OP. It is actually called an Item, not an ItemBlock, but that doesn't really make a difference. It's just the naming scheme the book told me to use, but seeing the recent posts, I'll use ItemBlock from now on. It's worth noting that these blocks behave perfectly in the inventory. They're both there, they both have the right names, and they're both textured correctly. The problems don't start until I place them in the world. I'm currently under the impression that ItemLightStone has nothing to do with this, since it's working perfectly. EDIT: Okay, I copied BlockStone's damageDropped(IBlockState state) method and now the blocks are being placed as the correct counterparts. But now the problem is the tile textures no longer want to load. Is there some special way of loading tile textures because of this IBlockState stuff?
  8. I attempted to make the changes you described, but it only resulted in the placed ore blocks no longer being textured (placing walls still places ore). I did add a new EnumType for the BlockLightStone class in addition to the methods you asked me to add. It turned out like this: package com.ferret.myfirstmod; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IStringSerializable; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockLightStone extends Block { String name = "lightstone"; public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BlockLightStone.EnumType.class); public BlockLightStone() { super(Material.rock); setUnlocalizedName(MyFirstMod.MODID + "_" + name); setCreativeTab(CreativeTabs.tabBlock); setHardness(2.0F); setResistance(5F); setStepSound(Block.soundTypeStone); setHarvestLevel("pickaxe", 2); } @SuppressWarnings({"unchecked", "rawtypes"}) @SideOnly(Side.CLIENT) @Override public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { for (int i = 0; i < 2; i++) { par3List.add(new ItemStack(par1, 1, i)); } } @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(VARIANT, BlockLightStone.EnumType.byMetadata(meta)); } @Override public int getMetaFromState(IBlockState state) { return ((BlockLightStone.EnumType)state.getValue(VARIANT)).getMetadata(); } @Override protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {VARIANT}); } public static enum EnumType implements IStringSerializable { ORE(0, "ore"), WALL(1, "wall"); /** Array of the Block's BlockStates */ private static final BlockLightStone.EnumType[] META_LOOKUP = new BlockLightStone.EnumType[values().length]; /** The BlockState's metadata. */ private final int meta; /** The EnumType's name. */ private final String name; private final String unlocalizedName; private EnumType(int meta, String name) { this(meta, name, name); } private EnumType(int meta, String name, String unlocalizedName) { this.meta = meta; this.name = name; this.unlocalizedName = unlocalizedName; } /** * Returns the EnumType's metadata value. */ public int getMetadata() { return this.meta; } public String toString() { return this.name; } /** * Returns an EnumType for the BlockState from a metadata value. */ public static BlockLightStone.EnumType byMetadata(int meta) { if (meta < 0 || meta >= META_LOOKUP.length) { meta = 0; } return META_LOOKUP[meta]; } public String getName() { return this.name; } public String getUnlocalizedName() { return this.unlocalizedName; } static { BlockLightStone.EnumType[] var0 = values(); int var1 = var0.length; for (int var2 = 0; var2 < var1; ++var2) { BlockLightStone.EnumType var3 = var0[var2]; META_LOOKUP[var3.getMetadata()] = var3; } } } } I made no changes to the other classes. Most of the changes made were copied directly from the BlockStone class and modified slightly. What have I done wrong this time? My guess is that I named something incorrectly in the EnumType. I'm sorry to be such a bother, but I can't seem to find any good guides on this subject that are suited for beginners like myself. Yes, ordinarily it would be best to just have two blocks, but for the purpose of learning how to make metadata blocks I'm making it one.
  9. Try as I might, I can't manage to glean the information I need in order to fix my code. I don't have a particularly exceptional understanding of Java, and as a result your explanations and examples seem to be a bit beyond me. I didn't want to ask how to implement Block.getStateFromMeta() and Block.getMetaFromState() in my code, but I don't see any other way. How do I?
  10. I've been attempting to learn how to mod in Minecraft 1.8 using Wuppy29's book on modding in Minecraft 1.7.10. I've consulted the "Updating your mod to 1.8" thread many times, and it's helped me out exceptionally, but I can't figure out what's going wrong this time. I copied the code in the book as best I could, leaving out things like IIcon since they've been replaced by all those .JSON files, but whenever I place one of my metadata blocks, the placed block always becomes metadata 0 (I know it isn't just the textures glitching, thanks to pick block). It isn't anything to do with the .JSON files, I'm fairly sure of that. Can anyone tell me what blatantly obvious fact I'm missing? Files: Mod file package com.ferret.myfirstmod; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.enchantment.Enchantment; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.DungeonHooks; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = MyFirstMod.MODID, version = MyFirstMod.VERSION) public class MyFirstMod { public static final String MODID = "ferret_myfirstmod"; public static final String VERSION = "1.0"; public static Item key; public static Item cube; public static Item berry; public static Item lightpickaxe; public static Item lightsword; public static Item lightaxe; public static Item lightshovel; public static Item lighthoe; public static Item lightpaxel; public static Item lightingot; public static Item lighthelmet; public static Item lightchestplate; public static Item lightleggings; public static Item lightboots; public static Item death; public static Block lightstone; ToolMaterial lightalloy = EnumHelper.addToolMaterial("lightalloy", 3, 1000, 11F, 3.5F, 10); ArmorMaterial lightarmor = EnumHelper.addArmorMaterial("lightarmor", "lightarmor", 1000, new int[] {3, 7, 6, 3}, 10); @EventHandler public void preInit(FMLPreInitializationEvent event) { key = new ItemKey(); GameRegistry.registerItem(key, "key"); cube = new ItemCube(); GameRegistry.registerItem(cube, "cube"); berry = new ItemBerry(3, 0.3F, true); GameRegistry.registerItem(berry, "berry"); lightpickaxe = new ItemLightPickaxe(lightalloy, "lightpickaxe"); GameRegistry.registerItem(lightpickaxe, "lightpickaxe"); lightsword = new ItemLightSword(lightalloy, "lightsword"); GameRegistry.registerItem(lightsword, "lightsword"); lightaxe = new ItemLightAxe(lightalloy, "lightaxe"); GameRegistry.registerItem(lightaxe, "lightaxe"); lightshovel = new ItemLightShovel(lightalloy, "lightshovel"); GameRegistry.registerItem(lightshovel, "lightshovel"); lighthoe = new ItemLightHoe(lightalloy, "lighthoe"); GameRegistry.registerItem(lighthoe, "lighthoe"); lightpaxel = new ItemLightPaxel(lightalloy, "lightpaxel"); GameRegistry.registerItem(lightpaxel, "lightpaxel"); lightingot = new ItemLightIngot(); GameRegistry.registerItem(lightingot, "lightingot"); lighthelmet = new ItemLightArmor(lightarmor, 0, 0, "lighthelmet"); lightchestplate = new ItemLightArmor(lightarmor, 0, 1, "lightchestplate"); lightleggings = new ItemLightArmor(lightarmor, 0, 2, "lightleggings"); lightboots = new ItemLightArmor(lightarmor, 0, 3, "lightboots"); GameRegistry.registerItem(lighthelmet, "LightHelmet"); GameRegistry.registerItem(lightchestplate, "LightChestplate"); GameRegistry.registerItem(lightleggings, "LightLeggings"); GameRegistry.registerItem(lightboots, "LightBoots"); death = new ItemDeath(0, 0.0F, true); GameRegistry.registerItem(death, "death"); lightstone = new BlockLightStone(); GameRegistry.registerBlock(lightstone, ItemLightStone.class, "lightstone"); } @EventHandler public void init(FMLInitializationEvent event) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.key, 0, new ModelResourceLocation("ferret_myfirstmod:greykey", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.key, 1, new ModelResourceLocation("ferret_myfirstmod:redkey", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.key, 2, new ModelResourceLocation("ferret_myfirstmod:greenkey", "inventory")); ModelBakery.addVariantName(key, new String[]{"ferret_myfirstmod:greykey", "ferret_myfirstmod:redkey", "ferret_myfirstmod:greenkey"}); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.cube, 0, new ModelResourceLocation("ferret_myfirstmod:cube", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.berry, 0, new ModelResourceLocation("ferret_myfirstmod:berry", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightpickaxe, 0, new ModelResourceLocation("ferret_myfirstmod:lightpickaxe", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightsword, 0, new ModelResourceLocation("ferret_myfirstmod:lightsword", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightaxe, 0, new ModelResourceLocation("ferret_myfirstmod:lightaxe", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightshovel, 0, new ModelResourceLocation("ferret_myfirstmod:lightshovel", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lighthoe, 0, new ModelResourceLocation("ferret_myfirstmod:lighthoe", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightpaxel, 0, new ModelResourceLocation("ferret_myfirstmod:lightpaxel", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightingot, 0, new ModelResourceLocation("ferret_myfirstmod:lightingot", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lighthelmet, 0, new ModelResourceLocation("ferret_myfirstmod:lighthelmet", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightchestplate, 0, new ModelResourceLocation("ferret_myfirstmod:lightchestplate", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightleggings, 0, new ModelResourceLocation("ferret_myfirstmod:lightleggings", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.lightboots, 0, new ModelResourceLocation("ferret_myfirstmod:lightboots", "inventory")); ModelBakery.addVariantName(lighthelmet, new String[]{"ferret_myfirstmod:lighthelmet", "ferret_myfirstmod:lightchestplate", "ferret_myfirstmod:lightleggings", "ferret_myfirstmod:lightboots"}); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this.death, 0, new ModelResourceLocation("ferret_myfirstmod:death", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this.lightstone), 0, new ModelResourceLocation("ferret_myfirstmod:lightstone", "inventory")); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(this.lightstone), 1, new ModelResourceLocation("ferret_myfirstmod:lightwall", "inventory")); ModelBakery.addVariantName(Item.getItemFromBlock(this.lightstone), new String[]{"ferret_myfirstmod:lightstone", "ferret_myfirstmod:lightwall"}); GameRegistry.addSmelting(Blocks.glowstone, new ItemStack(this.lightingot), 0.1F); GameRegistry.addRecipe(new ItemStack(this.lightsword), " X ", " X ", " Y ", 'X', this.lightingot, 'Y', Items.stick ); GameRegistry.addRecipe(new ItemStack(this.lightpickaxe), "XXX", " Y ", " Y ", 'X', this.lightingot, 'Y', Items.stick ); GameRegistry.addRecipe(new ItemStack(this.lightaxe), " XX", " YX", " Y ", 'X', this.lightingot, 'Y', Items.stick ); GameRegistry.addRecipe(new ItemStack(this.lightshovel), " X ", " Y ", " Y ", 'X', this.lightingot, 'Y', Items.stick ); GameRegistry.addRecipe(new ItemStack(this.lighthoe), " XX", " Y ", " Y ", 'X', this.lightingot, 'Y', Items.stick ); GameRegistry.addRecipe(new ItemStack(this.lightpaxel), "YXZ", 'X', this.lightingot, 'Y', this.lightpickaxe, 'Z', this.lightaxe ); //Adds a shapeless recipe to combine redstone and red dye to make more red dye GameRegistry.addShapelessRecipe(new ItemStack(Items.dye, 2, 1), Items.redstone, new ItemStack(Items.dye, 1, 1) ); //Adds a smelting recipe to turn stone in to stone bricks GameRegistry.addSmelting(Blocks.stone, new ItemStack(Blocks.stonebrick), 0.1F); //Adds a recipe to combine a stone sword and flint to create a stone sword enchanted with Sharpness I ItemStack enchantedSwordItemStack = new ItemStack(Items.stone_sword); enchantedSwordItemStack.addEnchantment(Enchantment.sharpness, 1); GameRegistry.addShapelessRecipe(enchantedSwordItemStack, Items.flint, Items.stone_sword ); //Removes spiders from the pool of possible dungeon spawner types DungeonHooks.removeDungeonMob("Spider"); //Adds blazes to the pool of possible dungeon spawner types DungeonHooks.addDungeonMob("Blaze", 100); //Adds 25-50 cobblestone as a possible item to appear in bonus chests ChestGenHooks.addItem(ChestGenHooks.BONUS_CHEST, new WeightedRandomChestContent(new ItemStack(Blocks.cobblestone), 25, 50, 10)); } } BlockLightStone package com.ferret.myfirstmod; import java.util.List; 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.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockLightStone extends Block { String name = "lightstone"; public BlockLightStone() { super(Material.rock); setUnlocalizedName(MyFirstMod.MODID + "_" + name); setCreativeTab(CreativeTabs.tabBlock); setHardness(2.0F); setResistance(5F); setStepSound(Block.soundTypeStone); setHarvestLevel("pickaxe", 2); } @SuppressWarnings({"unchecked", "rawtypes"}) @SideOnly(Side.CLIENT) @Override public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) { for (int i = 0; i < 2; i++) { par3List.add(new ItemStack(par1, 1, i)); } } } ItemLightStone package com.ferret.myfirstmod; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemLightStone extends ItemBlock{ public ItemLightStone(Block block) { super(block); setHasSubtypes(true); } @Override public int getMetadata(int par1) { return par1; } @Override public String getUnlocalizedName(ItemStack itemstack) { String name = ""; switch(itemstack.getItemDamage()) { case 0: name = "ore"; break; case 1: name = "wall"; break; default: System.out.println("Invalid metadata for Block LightStone"); name = "broken"; break; } return getUnlocalizedName() + "." + name; } } Thanks in advance.
  11. That worked, thanks!
  12. I've been trying to learn Forge recently with the help of Wuppy29's book, but since that was written for 1.7.10, I've had to refer to this thread many times. I've been trying to register the JSON files for a block. The OP says that the following line can be used for both blocks and items: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(YourItem, metadata, new ModelResourceLocation("modid:items_registered_name", "inventory")); But that method only works if the first parameter is an Item object. What am I supposed to do differently to register block models?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.