Posted March 10, 201411 yr I wanted to make my Ore only minable with an Iron Pickaxe but it seems like setHarvestLevel isn't working correctly cause I can mine my block with every pickaxe package Lord_of_Block.blocks; import Lord_of_Block.base.main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class NividiumBlock extends Block{ protected NividiumBlock(Material mat) { super(mat); setCreativeTab(CreativeTabs.tabBlock); setBlockName("Nividium Block"); setBlockTextureName("nividium:nividium_block"); setHarvestLevel("ItemPickaxe", 3); } public boolean canEntityDestroy(World world, int x, int y, int z, Entity entity) { return false; } }
March 10, 201411 yr afaik setHarvestLevel: when u get a item from the block != if its possible to mine with tool xy ********************************* ** Always remember you are unique, ** ** just like everyone else ** ********************************** Was my post helpful? Say thanks and press the thank you button, on my post!! God, damn it!
March 10, 201411 yr this.setHarvestLevel("pickaxe", Harvestlevel); I'm always happy to help others! Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL
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.