Remove unused vars, add @Overrides, update deprecated methods.
This commit is contained in:
Ben Spiers 2014-08-28 20:07:51 +01:00
parent e3fc694532
commit 9294719ab2
5 changed files with 12 additions and 5 deletions

View file

@ -750,11 +750,10 @@ public class BlockBasic extends Block
}
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
{
if(!player.capabilities.isCreativeMode && !world.isRemote && canHarvestBlock(player, world.getBlockMetadata(x, y, z)))
{
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getTileEntity(x, y, z);
float motion = 0.7F;
double motionX = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
@ -803,6 +802,7 @@ public class BlockBasic extends Block
}
}
@Override
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(x, y, z);
@ -821,6 +821,7 @@ public class BlockBasic extends Block
return valid;
}
@Override
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
{
TileEntity tile = world.getTileEntity(x, y, z);

View file

@ -165,7 +165,7 @@ public class BlockCardboardBox extends BlockContainer
}
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
{
if(!player.capabilities.isCreativeMode && !world.isRemote && canHarvestBlock(player, world.getBlockMetadata(x, y, z)))
{

View file

@ -324,6 +324,7 @@ public class BlockEnergyCube extends BlockContainer implements IPeripheralProvid
return true;
}
@Override
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(x, y, z);
@ -342,6 +343,7 @@ public class BlockEnergyCube extends BlockContainer implements IPeripheralProvid
return valid;
}
@Override
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
{
TileEntity tile = world.getTileEntity(x, y, z);

View file

@ -148,7 +148,7 @@ public class BlockGasTank extends BlockContainer
}
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
{
if(!player.capabilities.isCreativeMode && !world.isRemote && canHarvestBlock(player, world.getBlockMetadata(x, y, z)))
{
@ -237,6 +237,7 @@ public class BlockGasTank extends BlockContainer
return itemStack;
}
@Override
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(x, y, z);
@ -255,6 +256,7 @@ public class BlockGasTank extends BlockContainer
return valid;
}
@Override
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
{
TileEntity tile = world.getTileEntity(x, y, z);

View file

@ -827,7 +827,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
}
@Override
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest)
{
if(!player.capabilities.isCreativeMode && !world.isRemote && canHarvestBlock(player, world.getBlockMetadata(x, y, z)))
{
@ -1278,6 +1278,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
return null;
}
@Override
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
{
TileEntity tile = world.getTileEntity(x, y, z);
@ -1296,6 +1297,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
return valid;
}
@Override
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
{
TileEntity tile = world.getTileEntity(x, y, z);