From b423ffd1a5bdc09e931d08e2ab9e65df6f0b761c Mon Sep 17 00:00:00 2001 From: Gig Date: Sat, 6 Jun 2015 19:54:39 +0100 Subject: [PATCH] Gem ores now return gems --- src/main/java/techreborn/blocks/BlockOre.java | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java index 4b0815cc5..8c85ecf31 100644 --- a/src/main/java/techreborn/blocks/BlockOre.java +++ b/src/main/java/techreborn/blocks/BlockOre.java @@ -40,15 +40,26 @@ public class BlockOre extends Block { } @Override - public Item getItemDropped(int meta, Random random, int fortune){ - if (meta == 5){ - return new ItemStack(ModItems.dusts, 1, 60).getItem(); + public Item getItemDropped(int meta, Random random, int fortune) + { + if (meta == 2) + { + return new ItemStack(ModItems.gems, fortune, 0).getItem(); + } + if (meta == 3) + { + return new ItemStack(ModItems.gems, fortune, 1).getItem(); + } + if (meta == 5) + { + return new ItemStack(ModItems.dusts, fortune, 60).getItem(); } return Item.getItemFromBlock(this); } @Override - protected boolean canSilkHarvest() { + protected boolean canSilkHarvest() + { return true; } @@ -63,7 +74,20 @@ public class BlockOre extends Block { } @Override - public int damageDropped(int metaData){ + public int damageDropped(int metaData) + { + if(metaData == 2 ) + { + return 0; + } + else if(metaData == 3) + { + return 1; + } + else if(metaData == 5) + { + return 60; + } return metaData; } @@ -90,7 +114,8 @@ public class BlockOre extends Block { || ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) { return textures[metaData]; - } else + } + else { return textures[metaData]; }