Skip to content

Commit

Permalink
Minor code cleanup: suppress deprecation warnings (BlockFlower.java). (
Browse files Browse the repository at this point in the history
  • Loading branch information
RusTit authored and mezz committed Mar 14, 2018
1 parent 8881e58 commit f5289f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions botany/src/main/java/binnie/botany/blocks/BlockFlower.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, En

@Override
@Nullable
@SuppressWarnings("deprecation")
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) {
return null;
}

@Override
@SuppressWarnings("deprecation")
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
TileEntity tile = source.getTileEntity(pos);
if (tile instanceof TileEntityFlower) {
Expand All @@ -136,11 +138,13 @@ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, Bloc
}

@Override
@SuppressWarnings("deprecation")
public boolean isOpaqueCube(IBlockState state) {
return false;
}

@Override
@SuppressWarnings("deprecation")
public boolean isFullCube(IBlockState state) {
return false;
}
Expand Down Expand Up @@ -225,6 +229,7 @@ public EnumOffsetType getOffsetType() {

@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("deprecation")
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
TileEntityFlower flower = TileUtil.getTile(world, pos, TileEntityFlower.class);
if (flower != null && flower.getType() != null) {
Expand Down Expand Up @@ -256,6 +261,7 @@ public BlockRenderLayer getBlockLayer() {
}

@Override
@SuppressWarnings("deprecation")
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) {
checkAndDropBlock(worldIn, pos);
TileEntity tile = worldIn.getTileEntity(pos);
Expand Down Expand Up @@ -298,6 +304,7 @@ public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos
}

@Override
@SuppressWarnings("deprecation")
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) {
List<ItemStack> drops = getDrops(world, pos, world.getBlockState(pos), 0);
boolean hasBeenBroken = world.setBlockToAir(pos);
Expand Down

0 comments on commit f5289f9

Please sign in to comment.