Cleanup
Remove unused vars, add @Overrides, update deprecated methods.
This commit is contained in:
parent
e3fc694532
commit
9294719ab2
5 changed files with 12 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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)))
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue