From 390e989cf9aec17c222506ccc29350b9e9b7a2ea Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 28 Dec 2013 16:28:48 +1100 Subject: [PATCH] Fixed tool effectiveness on blocks --- .../biomesoplenty/common/blocks/BlockAsh.java | 1 + .../common/blocks/BlockBOPGems.java | 7 +++++++ .../common/blocks/BlockBOPGeneric.java | 4 ++++ .../common/blocks/BlockBOPLog.java | 2 ++ .../common/blocks/BlockBOPPlank.java | 1 + .../common/blocks/BlockLongGrass.java | 1 + .../common/blocks/BlockOriginGrass.java | 1 + .../biomesoplenty/common/core/BOPBlocks.java | 17 ----------------- .../biomesoplenty/common/core/BOPItems.java | 10 +++++----- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/biomesoplenty/common/blocks/BlockAsh.java b/src/main/java/biomesoplenty/common/blocks/BlockAsh.java index 10aa86ebc..425add7b2 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockAsh.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockAsh.java @@ -24,6 +24,7 @@ public class BlockAsh extends Block //TODO: this.setHardness this.func_149711_c(0.4F); + this.setHarvestLevel("shovel", 0); //TODO setStepSound(Block.soundSandFootstep) this.func_149672_a(Block.field_149776_m); diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPGems.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPGems.java index 5ebd5d638..ebae16b9d 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPGems.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPGems.java @@ -26,6 +26,13 @@ public class BlockBOPGems extends Block //TODO: Material.rock super(Material.field_151576_e); + this.setHarvestLevel("pickaxe", 3, 0); + + for (int i = 1; i < 16; i++) + { + this.setHarvestLevel("pickaxe", 2, i); + } + //TODO setStepSound(Block.soundStoneFootstep) this.func_149672_a(Block.field_149780_i); diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPGeneric.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPGeneric.java index 1409621ce..aa42eeaee 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPGeneric.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPGeneric.java @@ -49,6 +49,8 @@ public class BlockBOPGeneric extends Block case DRIED_DIRT: //TODO: this.setHardness this.func_149711_c(0.1F); + this.setHarvestLevel("pickaxe", 0); + //TODO setStepSound(Block.soundStoneFootstep) this.func_149672_a(Block.field_149780_i); break; @@ -70,6 +72,8 @@ public class BlockBOPGeneric extends Block case HARD_SAND: //TODO: this.setHardness this.func_149711_c(0.7F); + this.setHarvestLevel("shovel", 0); + //TODO setStepSound(Block.soundSandFootstep) this.func_149672_a(Block.field_149776_m); break; diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPLog.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPLog.java index b96440110..0feaf2e38 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPLog.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPLog.java @@ -60,6 +60,8 @@ public class BlockBOPLog extends Block //TODO: this.setHardness this.func_149711_c(2.0F); + this.setHarvestLevel("axe", 0); + //TODO: this.setResistance this.func_149752_b(5.0F); //TODO setStepSound(Block.soundWoodFootstep) diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPPlank.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPPlank.java index 6e5c7eceb..a7cf978ec 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPPlank.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPPlank.java @@ -24,6 +24,7 @@ public class BlockBOPPlank extends Block //TODO: this.setHardness this.func_149711_c(2.0F); + this.setHarvestLevel("axe", 0); //TODO setStepSound(Block.soundWoodFootstep) this.func_149672_a(Block.field_149766_f); diff --git a/src/main/java/biomesoplenty/common/blocks/BlockLongGrass.java b/src/main/java/biomesoplenty/common/blocks/BlockLongGrass.java index 7495e1db8..d214aa061 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockLongGrass.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockLongGrass.java @@ -26,6 +26,7 @@ public class BlockLongGrass extends Block //TODO: this.setHardness this.func_149711_c(0.6F); + this.setHarvestLevel("shovel", 0); //TODO setStepSound(Block.soundGrassFootstep) this.func_149672_a(Block.field_149779_h); diff --git a/src/main/java/biomesoplenty/common/blocks/BlockOriginGrass.java b/src/main/java/biomesoplenty/common/blocks/BlockOriginGrass.java index 1f73787be..10b8e0be8 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockOriginGrass.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockOriginGrass.java @@ -26,6 +26,7 @@ public class BlockOriginGrass extends Block //TODO: this.setHardness this.func_149711_c(0.6F); + this.setHarvestLevel("shovel", 0); //TODO setStepSound(Block.soundGrassFootstep) this.func_149672_a(Block.field_149779_h); diff --git a/src/main/java/biomesoplenty/common/core/BOPBlocks.java b/src/main/java/biomesoplenty/common/core/BOPBlocks.java index d821d0220..9e09bd7ef 100644 --- a/src/main/java/biomesoplenty/common/core/BOPBlocks.java +++ b/src/main/java/biomesoplenty/common/core/BOPBlocks.java @@ -233,23 +233,6 @@ public class BOPBlocks registerBlock(new BlockBOPColorizedLeaves(ColourizedLeafCategory.CAT2).func_149663_c("colorizedLeaves2"), ItemBlockColorizedLeaves.class); } - private static void setHarvestLevels() - { - /*TODO MinecraftForge.setBlockHarvestLevel(Blocks.originGrass.get(), "shovel", 0); - MinecraftForge.setBlockHarvestLevel(Blocks.longGrass.get(), "shovel", 0); - MinecraftForge.setBlockHarvestLevel(Blocks.hardSand.get(), "shovel", 0); - MinecraftForge.setBlockHarvestLevel(Blocks.holyGrass.get(), 0, "pickaxe", 0); - - MinecraftForge.setBlockHarvestLevel(Blocks.driedDirt.get(), "pickaxe", 0); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 0, "pickaxe", 3); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 2, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 4, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 6, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 8, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 10, "pickaxe", 2); - MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), 12, "pickaxe", 2);*/ - } - public static void registerBlock(Block block) { //TODO: getUnlocalizedName() diff --git a/src/main/java/biomesoplenty/common/core/BOPItems.java b/src/main/java/biomesoplenty/common/core/BOPItems.java index d23a211ac..73c9548da 100644 --- a/src/main/java/biomesoplenty/common/core/BOPItems.java +++ b/src/main/java/biomesoplenty/common/core/BOPItems.java @@ -68,11 +68,11 @@ public class BOPItems registerItem(new ItemBOPAxe(BOPItemHelper.toolMaterialMud, 0).setUnlocalizedName("axeMud")); registerItem(new ItemBOPHoe(BOPItemHelper.toolMaterialMud, 0).setUnlocalizedName("hoeMud")); - registerItem(new ItemBOPSword(BOPItemHelper.toolMaterialMud, 1).setUnlocalizedName("swordAmethyst")); - registerItem(new ItemBOPSpade(BOPItemHelper.toolMaterialMud, 1).setUnlocalizedName("shovelAmethyst")); - registerItem(new ItemBOPPickaxe(BOPItemHelper.toolMaterialMud, 1).setUnlocalizedName("pickaxeAmethyst")); - registerItem(new ItemBOPAxe(BOPItemHelper.toolMaterialMud, 1).setUnlocalizedName("axeAmethyst")); - registerItem(new ItemBOPHoe(BOPItemHelper.toolMaterialMud, 1).setUnlocalizedName("hoeAmethyst")); + registerItem(new ItemBOPSword(BOPItemHelper.toolMaterialAmethyst, 1).setUnlocalizedName("swordAmethyst")); + registerItem(new ItemBOPSpade(BOPItemHelper.toolMaterialAmethyst, 1).setUnlocalizedName("shovelAmethyst")); + registerItem(new ItemBOPPickaxe(BOPItemHelper.toolMaterialAmethyst, 1).setUnlocalizedName("pickaxeAmethyst")); + registerItem(new ItemBOPAxe(BOPItemHelper.toolMaterialAmethyst, 1).setUnlocalizedName("axeAmethyst")); + registerItem(new ItemBOPHoe(BOPItemHelper.toolMaterialAmethyst, 1).setUnlocalizedName("hoeAmethyst")); registerItem(new ItemBOPScythe(ToolMaterial.WOOD, 0).setUnlocalizedName("scytheWood")); registerItem(new ItemBOPScythe(ToolMaterial.STONE, 1).setUnlocalizedName("scytheStone"));