Posted October 18, 201312 yr hi im having trouble getting my ore to drop my items using meta data BlockOreEmeraldCrystal class: package fergoman007.mods.fergotools.block; import java.util.Random; import fergoman007.mods.fergotools.FergoTools; import fergoman007.mods.fergotools.lib.Reference; import fergoman007.mods.fergotools.lib.Strings; import fergoman007.mods.fergotools.lib.Textures; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.world.World; public class BlockOreEmeraldCrystal extends Block { public BlockOreEmeraldCrystal(int par1, Material par2Material) { super(par1, par2Material); this.setUnlocalizedName(Strings.oreEmeraldCrystal); this.setHardness(2.5f); this.setStepSound(soundStoneFootstep); this.setResistance(50f); this.setCreativeTab(FergoTools.tabFergoBlocks); } public void registerIcons(IconRegister register) { blockIcon = register.registerIcon(Reference.TEXTURE_LOC + Textures.oreEmeraldCrystalTexture); } public int damageDropped(int metadata) { switch(metadata) { case 1: return FergoTools.fergoMaterials.itemID; } return metadata; } @Override public int idDropped(int metadata, Random random, int par2) { switch(metadata) { case 1 : return FergoTools.fergoMaterials.itemID; // Error Case default: return -1; // air } } public int quantityDropped(int par1, Random rand, int par2) { return 3 + rand.nextInt(4) + 1; } public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int meta) { this.dropXpOnBlockBreak(world, x, y, z, 4); } } i would appreciate the help
October 18, 201312 yr @Override public int damageDropped(int metadata) { return metadata; } Would make more sense.
October 18, 201312 yr You may also want @Override public int idDropped(int metadata, Random random, int par2) { return FergoTools.fergoMaterials.itemID; }
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.