1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-14 20:17:11 +00:00

Make many fields final

This commit is contained in:
SquidDev
2017-05-07 01:52:55 +01:00
parent a3400ecf26
commit 5a60818c99
14 changed files with 34 additions and 60 deletions

View File

@@ -245,11 +245,7 @@ public class TileTurtle extends TileComputerBase
}
else
{
if( exploder != null && ( exploder instanceof EntityLivingBase || exploder instanceof EntityFireball ) )
{
return true;
}
return false;
return exploder != null && (exploder instanceof EntityLivingBase || exploder instanceof EntityFireball);
}
}
@@ -705,11 +701,7 @@ public class TileTurtle extends TileComputerBase
case 5: upgrade = getUpgrade( TurtleSide.Left ); break;
default: return false;
}
if( upgrade != null && upgrade.getType().isPeripheral() )
{
return true;
}
return false;
return upgrade != null && upgrade.getType().isPeripheral();
}
public void transferStateFrom( TileTurtle copy )

View File

@@ -140,11 +140,7 @@ public class TurtleTool implements ITurtleUpgrade
{
IBlockState state = world.getBlockState( pos );
Block block = state.getBlock();
if( block.isAir( state, world, pos ) || block == Blocks.BEDROCK || state.getBlockHardness( world, pos ) <= -1.0F )
{
return false;
}
return true;
return !block.isAir( state, world, pos ) && block != Blocks.BEDROCK && state.getBlockHardness( world, pos ) > -1.0F;
}
protected boolean canHarvestBlock( World world, BlockPos pos )