Posted May 31, 201411 yr So I have lots of custom ores and I want each one to be mineable only with the previous tier of ore For example, Orichulum can only be mined with Diamond, Mythril only with Orichulum, and so on. But for some reason, every tool I make can mine every block I make, regardless of its harvest level. What am I doing wrong? ToolMaterials: public static ToolMaterial ORICHULUM = EnumHelper.addToolMaterial("ORICHULUM", 4, 1800, 9F, 4F, 50); public static ToolMaterial MYTHRIL = EnumHelper.addToolMaterial("MYTHRIL", 5, 2100, 10.0F, 6.0F, 12); public static ToolMaterial ERIDIUM = EnumHelper.addToolMaterial("ERIDIUM", 6, 2800, 11.0F, 8.0F, 14); Tools: orichulumPick = new com.pixelmoncore.tools.nightmarePick(ORICHULUM).setCreativeTab(tabPixelmonCoreTools).setUnlocalizedName("orichulumPick").setTextureName("pixelmoncore:" + "orichulumPick"); mythrilPick = new com.pixelmoncore.tools.nightmarePick(MYTHRIL).setCreativeTab(tabPixelmonCoreTools).setUnlocalizedName("mythrilPick").setTextureName("pixelmoncore:" + "mythrilPick"); package com.pixelmoncore.tools; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; public class orichulumPick extends ItemPickaxe { public orichulumPick(ToolMaterial material) { super(material); this.setMaxStackSize(1); } public void addInformation(ItemStack item, EntityPlayer player, List list, boolean par4) { list.add("Can mine Mythril"); } } package com.pixelmoncore.tools; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; public class mythrilPick extends ItemPickaxe { public mythrilPick(ToolMaterial material) { super(material); this.setMaxStackSize(1); } public void addInformation(ItemStack item, EntityPlayer player, List list, boolean par4) { list.add("Can mine Eridium"); } } Blocks: package com.pixelmoncore.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class orichulumOre extends Block { public orichulumOre() { super(Material.rock); this.setHardness(4F); this.setResistance(5F); } public void setHarvestLevel(String toolClass, int level) { for (int m = 0; m < 16; m++) { setHarvestLevel("pickaxe", 3); } } } package com.pixelmoncore.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class mythrilOre extends Block { public mythrilOre() { super(Material.rock); this.setHardness(6F); this.setResistance(5F); } public void setHarvestLevel(String toolClass, int level) { for (int m = 0; m < 16; m++) { setHarvestLevel("pickaxe", 4); } } }
June 8, 201411 yr If this is for 1.7.2 then put the setHarvestLevel in your constructor like: this.setHarvestLevel("pickaxe", Whatever_level); 0 = Wood and Gold, 1 = Stone, 2 = Iron, 3 = Diamond
June 8, 201411 yr Author Ah, I thought that might be it, but I've been going off of tutorials that showed it the way I had it, so... Got it working, thanks.
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.