From e1bd50ecc096602b8ba9780545e86a7fa08d018d Mon Sep 17 00:00:00 2001 From: Adubbz Date: Thu, 17 Mar 2016 20:41:51 +1100 Subject: [PATCH] Updated to the latest MCP mappings, began work on fixing collision/selection boxes --- .../common/block/BlockBOPAsh.java | 7 ++- .../common/block/BlockBOPBamboo.java | 20 +++++-- .../common/block/BlockBOPBiomeBlock.java | 2 +- .../common/block/BlockBOPBones.java | 57 +++++-------------- .../common/block/BlockBOPCoral.java | 2 +- .../common/block/BlockBOPCrystal.java | 2 +- .../common/block/BlockBOPDecoration.java | 16 +++--- .../common/block/BlockBOPDirt.java | 2 +- .../common/block/BlockBOPDoubleWoodSlab.java | 2 +- .../common/block/BlockBOPFarmland.java | 2 +- .../common/block/BlockBOPFence.java | 2 +- .../common/block/BlockBOPFenceGate.java | 2 +- .../common/block/BlockBOPFlesh.java | 2 +- .../common/block/BlockBOPGem.java | 2 +- .../common/block/BlockBOPGemOre.java | 2 +- .../common/block/BlockBOPGeneric.java | 2 +- .../common/block/BlockBOPGrass.java | 2 +- .../common/block/BlockBOPHalfOtherSlab.java | 2 +- .../common/block/BlockBOPHalfWoodSlab.java | 2 +- .../common/block/BlockBOPHive.java | 2 +- .../common/block/BlockBOPHoney.java | 2 +- .../common/block/BlockBOPLilypad.java | 2 +- .../common/block/BlockBOPMud.java | 2 +- .../common/block/BlockBOPPlanks.java | 2 +- .../common/block/BlockBOPSand.java | 2 +- .../common/block/BlockBOPSapling.java | 2 +- .../common/block/BlockBOPSeaweed.java | 2 +- .../common/block/BlockBOPStone.java | 2 +- .../common/block/BlockBOPVine.java | 2 +- .../common/handler/UseHoeEventHandler.java | 2 +- 30 files changed, 66 insertions(+), 86 deletions(-) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java index 5b7e2d8ec..7d1e7b81b 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPAsh.java @@ -28,21 +28,22 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBOPAsh extends BlockBOPGeneric { + protected static final AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.875D, 1.0D); + public BlockBOPAsh() { super(Material.sand, SoundType.SAND); this.setHardness(0.4F); this.setHarvestLevel("shovel", 0); - this.setStepSound(SoundType.SAND); + this.setSoundType(SoundType.SAND); } // ash blocks are slightly lower @Override public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) { - float heightOffset = 0.125F; - return new AxisAlignedBB((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), (double) (pos.getX() + 1), (double) ((float) (pos.getY() + 1) - heightOffset), (double) (pos.getZ() + 1)); + return COLLISION_BOX; } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java index 84576a188..811358e84 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBamboo.java @@ -30,7 +30,8 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBOPBamboo extends BlockBOPDecoration { - + protected static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.1875D, 0.0D, 0.1875D, 0.8125D, 1.0D, 0.8125D); + // add properties public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 15); @Override @@ -41,8 +42,7 @@ public class BlockBOPBamboo extends BlockBOPDecoration { super(Material.wood); this.setHardness(0.2F); - this.setStepSound(SoundType.WOOD); - //this.setBlockBoundsByRadiusAndHeight(0.1875F , 1.0F); + this.setSoundType(SoundType.WOOD); this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0))); } @@ -54,8 +54,18 @@ public class BlockBOPBamboo extends BlockBOPDecoration { return direction == EnumFacing.UP && plantable.getPlant(world, pos.offset(direction)).getBlock() == this; } - - + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { + return BOUNDING_BOX; + } + + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) + { + return BOUNDING_BOX; + } @Override public boolean canBlockStay(World world, BlockPos pos, IBlockState state) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java index bd7d6f622..6900a01e8 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBiomeBlock.java @@ -34,7 +34,7 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric public BlockBOPBiomeBlock() { super(Material.glass, SoundType.GLASS); this.setHardness(0.6F); - this.setStepSound(SoundType.GLASS); + this.setSoundType(SoundType.GLASS); } // list of biomes which have an associated essence (possible drops when this block is broken) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java index 6d7310eba..3e268ec5c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPBones.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPBones.java @@ -84,7 +84,7 @@ public class BlockBOPBones extends Block implements IBOPBlock // set some defaults this.setHardness(3.0F); this.setResistance(5.0F); - this.setStepSound(SoundType.STONE); + this.setSoundType(SoundType.STONE); this.setDefaultState(this.blockState.getBaseState().withProperty(AXIS, EnumFacing.Axis.Y).withProperty(VARIANT, BoneType.LARGE)); } @@ -120,70 +120,39 @@ public class BlockBOPBones extends Block implements IBOPBlock return this.getMetaFromState(this.getDefaultState().withProperty(VARIANT, state.getValue(VARIANT))); } - -/* @Override - @SideOnly(Side.CLIENT) - public AxisAlignedBB getSelectedBoundingBox(World worldIn, BlockPos pos) - { - this.setBlockBoundsBasedOnState(worldIn, pos); - return super.getSelectedBoundingBox(worldIn, pos); - } - @Override - public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - this.setBlockBoundsBasedOnState(worldIn, pos); - return super.getCollisionBoundingBox(worldIn, pos, state); - } - - // bounding box is a bit complex as it depends on both size and orientation - @Override - public void setBlockBoundsBasedOnState(IBlockAccess world, BlockPos pos) - { - IBlockState state = world.getBlockState(pos); - - if (state.getBlock() != this) - return; - - float width; + double width = 1.0D; switch ((BoneType) state.getValue(VARIANT)) { case SMALL: - width = 0.25F; + width = 0.25D; break; case MEDIUM: - width = 0.625F; - break; - - case LARGE: - width = 1F; - break; - - default: - width = 1F; + width = 0.625D; break; } - float min = (1.0F - width) / 2F; - float max = 1.0F - min; + double min = (1.0D - width) / 2D; + double max = 1.0D - min; switch ((EnumFacing.Axis) state.getValue(AXIS)) { case X: - this.setBlockBounds(0F, min, min, 1.0F, max, max); - break; + return new AxisAlignedBB(0.0D, min, min, 1.0D, max, max); case Y: - this.setBlockBounds(min, 0F, min, max, 1.0F, max); - break; + return new AxisAlignedBB(min, 0.0D, min, max, 1.0D, max); case Z: - this.setBlockBounds(min, min, 0F, max, max, 1.0F); - break; + return new AxisAlignedBB(min, min, 0.0D, max, max, 1.0D); } - }*/ + + return FULL_BLOCK_AABB; + } @Override public boolean isOpaqueCube(IBlockState state) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java index 422d31abc..8abecd72e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCoral.java @@ -68,7 +68,7 @@ public class BlockBOPCoral extends BlockBOPDecoration // set some defaults this.setHardness(0.6F); - this.setStepSound(SoundType.SAND); + this.setSoundType(SoundType.SAND); this.setDefaultState( this.blockState.getBaseState().withProperty(LEVEL, 15).withProperty(VARIANT, CoralType.PINK) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java index 7e205cd48..b688d1d15 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPCrystal.java @@ -46,7 +46,7 @@ public class BlockBOPCrystal extends Block implements IBOPBlock this.setHardness(0.15F); this.setResistance(5.0F); this.setLightLevel(1.0F); - this.setStepSound(SoundType.GLASS); + this.setSoundType(SoundType.GLASS); } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java index 3ae487409..4e859d110 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDecoration.java @@ -57,10 +57,17 @@ public class BlockBOPDecoration extends Block implements IBOPBlock // set some defaults this.setTickRandomly(true); this.setHardness(0.0F); - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setDefaultState(this.blockState.getBaseState()); } + + // no collision box - you can walk straight through them + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState state, World world, BlockPos pos) + { + return NULL_AABB; + } /* // utility function for setting the block bounds - typically decoration blocks are smaller than full block size public void setBlockBoundsByRadiusAndHeight(float radius, float height) @@ -142,13 +149,6 @@ public class BlockBOPDecoration extends Block implements IBOPBlock return true; } -/* // no collision box - you can walk straight through them - @Override - public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) - { - return null; - }*/ - // not opaque @Override public boolean isOpaqueCube(IBlockState state) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java index 27f923185..dfc8ad154 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java @@ -78,7 +78,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType this.setTickRandomly(true); this.setHardness(0.5F); this.setHarvestLevel("shovel", 0); - this.setStepSound(SoundType.GROUND); + this.setSoundType(SoundType.GROUND); this.setDefaultState( this.blockState.getBaseState().withProperty(COARSE, Boolean.valueOf(false)).withProperty(VARIANT, BOPDirtType.LOAMY) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java index 5340ad893..68ffabf1e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDoubleWoodSlab.java @@ -94,7 +94,7 @@ public class BlockBOPDoubleWoodSlab extends BlockSlab implements IBOPBlock super(Material.wood); this.useNeighborBrightness = true; this.setHardness(2.0F).setResistance(5.0F); - this.setStepSound(SoundType.WOOD); + this.setSoundType(SoundType.WOOD); this.setHarvestLevel("axe", 0); this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM)); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java index 3f81f1615..c15673039 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java @@ -89,7 +89,7 @@ public class BlockBOPFarmland extends BlockFarmland implements IBOPBlock this.useNeighborBrightness = true; this.setHardness(0.6F); this.setHarvestLevel("shovel", 0); - this.setStepSound(SoundType.GROUND); + this.setSoundType(SoundType.GROUND); this.setDefaultState(this.blockState.getBaseState().withProperty(MOISTURE, Integer.valueOf(0))); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java index 0bd4f506a..70d27bbb1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFence.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFence.java @@ -64,7 +64,7 @@ public class BlockBOPFence extends BlockFence implements IBOPBlock this.setHardness(2.0F); this.setResistance(5.0F); - this.setStepSound(SoundType.WOOD); + this.setSoundType(SoundType.WOOD); } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java index 8656c4aae..385d69134 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFenceGate.java @@ -66,7 +66,7 @@ public class BlockBOPFenceGate extends BlockFenceGate implements IBOPBlock this.setHardness(2.0F); this.setResistance(5.0F); - this.setStepSound(SoundType.WOOD); + this.setSoundType(SoundType.WOOD); } public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java index 80e1614f8..be81d8f13 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFlesh.java @@ -49,7 +49,7 @@ public class BlockBOPFlesh extends Block implements IBOPBlock public BlockBOPFlesh() { super(Material.sponge); this.setHardness(0.4F); - this.setStepSound(SoundType.GROUND); + this.setSoundType(SoundType.GROUND); } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java index 06ff9d03c..50a552e41 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGem.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGem.java @@ -51,7 +51,7 @@ public class BlockBOPGem extends Block implements IBOPBlock // set some defaults this.setHardness(5.0F); this.setResistance(10.0F); - this.setStepSound(SoundType.METAL); + this.setSoundType(SoundType.METAL); this.setHarvestLevel("pickaxe", 2); this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, BOPGems.AMETHYST) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java index 3d98d1053..fe07069c4 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGemOre.java @@ -61,7 +61,7 @@ public class BlockBOPGemOre extends Block implements IBOPBlock // set some defaults this.setHardness(3.0F); this.setResistance(5.0F); - this.setStepSound(SoundType.STONE); + this.setSoundType(SoundType.STONE); this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, BOPGems.AMETHYST) ); // all variants need pickaxe:2 to harvest, except amethyst which needs pickaxe:3 diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java index b93cec90d..dfe1fbe22 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGeneric.java @@ -51,7 +51,7 @@ public class BlockBOPGeneric extends Block implements IBOPBlock, ISustainsPlantT super(material); // set some defaults this.setHardness(1.0F); - this.setStepSound(soundType); + this.setSoundType(soundType); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java index 52dcec63b..bf37b3fea 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java @@ -96,7 +96,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla // set some defaults this.setHardness(0.6F); this.setHarvestLevel("shovel", 0); - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setDefaultState(this.blockState.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)).withProperty(VARIANT, BOPGrassType.LOAMY)); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java index a7a6e6224..e43cc9487 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfOtherSlab.java @@ -119,7 +119,7 @@ public class BlockBOPHalfOtherSlab extends BlockSlab implements IBOPBlock { super(Material.rock); this.useNeighborBrightness = true; - this.setStepSound(SoundType.STONE); + this.setSoundType(SoundType.STONE); // TODO: should depend on variant really, but that's quite hard to achieve... this.setHardness(2.0F).setResistance(7.0F); this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM)); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java index 3898ef6c3..54e1974a1 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHalfWoodSlab.java @@ -92,7 +92,7 @@ public class BlockBOPHalfWoodSlab extends BlockSlab implements IBOPBlock super(Material.wood); this.useNeighborBrightness = true; this.setHardness(2.0F).setResistance(5.0F); - this.setStepSound(SoundType.WOOD); + this.setSoundType(SoundType.WOOD); this.setHarvestLevel("axe", 0); this.setDefaultState(this.blockState.getBaseState().withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM)); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java index a9ad1a969..08aabc4bd 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHive.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHive.java @@ -72,7 +72,7 @@ public class BlockBOPHive extends Block implements IBOPBlock // set some defaults this.setHardness(0.5F); - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, HiveType.HIVE) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java index 9c733a938..d835d9843 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPHoney.java @@ -39,7 +39,7 @@ public class BlockBOPHoney extends Block implements IBOPBlock public BlockBOPHoney() { super(Material.glass); this.setHardness(0.5F); - this.setStepSound(SoundType.STONE); + this.setSoundType(SoundType.STONE); } @Override diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java b/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java index 2182ceb06..85d9e2767 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPLilypad.java @@ -68,7 +68,7 @@ public class BlockBOPLilypad extends BlockLilyPad implements IBOPBlock public BlockBOPLilypad() { - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, LilypadType.MEDIUM)); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java index 56b44b749..5d2bc5a2b 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPMud.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPMud.java @@ -80,7 +80,7 @@ public class BlockBOPMud extends Block implements IBOPBlock, ISustainsPlantType // set some defaults this.setHardness(0.6F); - this.setStepSound(SoundType.SAND); + this.setSoundType(SoundType.SAND); this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, MudType.MUD) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java index b2725cf28..8ab42e98e 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlanks.java @@ -82,7 +82,7 @@ public class BlockBOPPlanks extends Block implements IBOPBlock super(Material.wood); this.setDefaultState(this.blockState.getBaseState()); this.setHardness(2.0F).setResistance(5.0F); - this.setStepSound(SoundType.WOOD); + this.setSoundType(SoundType.WOOD); this.setHarvestLevel("axe", 0); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java index 694b58956..c62bbd361 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSand.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSand.java @@ -73,7 +73,7 @@ public class BlockBOPSand extends BlockFalling implements IBOPBlock, ISustainsPl // set some defaults this.setHardness(0.6F); - this.setStepSound(SoundType.SAND); + this.setSoundType(SoundType.SAND); this.setDefaultState( this.blockState.getBaseState().withProperty(VARIANT, SandType.QUICKSAND) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java index 6e54bbbca..a72d87cb7 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSapling.java @@ -95,7 +95,7 @@ public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable { public BlockBOPSapling() { super(); - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); //this.setBlockBoundsByRadiusAndHeight(0.4F, 0.8F); this.setDefaultState(this.blockState.getBaseState().withProperty(STAGE, Integer.valueOf(0))); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java index 90b3adaa7..262c2b5ef 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPSeaweed.java @@ -87,7 +87,7 @@ public class BlockBOPSeaweed extends BlockBOPDecoration implements IBOPBlock super(Material.water); // set some defaults - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setDefaultState( this.blockState.getBaseState().withProperty(LEVEL, 15).withProperty(POSITION, SeaweedPosition.SINGLE).withProperty(VARIANT, SeaweedType.KELP) ); } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java index 649e7d9ca..03696cea2 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPStone.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPStone.java @@ -70,7 +70,7 @@ public class BlockBOPStone extends Block implements IBOPBlock super(Material.rock); // set some defaults - this.setStepSound(SoundType.STONE); + this.setSoundType(SoundType.STONE); this.setHarvestLevel("pickaxe", 1, this.getDefaultState().withProperty(VARIANT, StoneType.LIMESTONE)); this.setHarvestLevel("pickaxe", 2, this.getDefaultState().withProperty(VARIANT, StoneType.SILTSTONE)); this.setHarvestLevel("pickaxe", 3, this.getDefaultState().withProperty(VARIANT, StoneType.SHALE)); diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java index a4b2caf36..c17c9d087 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPVine.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPVine.java @@ -47,7 +47,7 @@ public class BlockBOPVine extends BlockVine implements IBOPBlock public BlockBOPVine(boolean useGreyScaleTextures) { - this.setStepSound(SoundType.PLANT); + this.setSoundType(SoundType.PLANT); this.setHardness(0.2F); this.useGreyScaleTextures = useGreyScaleTextures; } diff --git a/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java index 0704aa5e5..803ad37e2 100644 --- a/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java @@ -74,7 +74,7 @@ public class UseHoeEventHandler { event.current.damageItem(1, event.entityLiving); } - event.world.playSound(event.entityPlayer, (double) ((float) pos.getX() + 0.5F), (double) ((float) pos.getY() + 0.5F), (double) ((float) pos.getZ() + 0.5F), block.getStepSound().getStepSound(), SoundCategory.BLOCKS, (state.getBlock().getStepSound().getVolume() + 1.0F) / 2.0F, state.getBlock().getStepSound().getPitch() * 0.8F); + event.world.playSound(event.entityPlayer, (double) ((float) pos.getX() + 0.5F), (double) ((float) pos.getY() + 0.5F), (double) ((float) pos.getZ() + 0.5F), block.getSoundType().getStepSound(), SoundCategory.BLOCKS, (state.getBlock().getSoundType().getVolume() + 1.0F) / 2.0F, state.getBlock().getSoundType().getPitch() * 0.8F); event.entityPlayer.swingArm(PlayerUtil.getHandForItem(event.entityPlayer, event.current)); } }