final variables and parameters
This commit is contained in:
@@ -17,7 +17,7 @@ public class ChunkOnly extends StandardWorld
|
||||
final int cz;
|
||||
int verticalBits = 0;
|
||||
|
||||
public ChunkOnly( World w, int cx, int cz )
|
||||
public ChunkOnly( final World w, final int cx, final int cz )
|
||||
{
|
||||
super( w );
|
||||
this.target = w.getChunkFromChunkCoords( cx, cz );
|
||||
@@ -26,31 +26,31 @@ public class ChunkOnly extends StandardWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minX( int in )
|
||||
public int minX( final int in )
|
||||
{
|
||||
return Math.max( in, this.cx << 4 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minZ( int in )
|
||||
public int minZ( final int in )
|
||||
{
|
||||
return Math.max( in, this.cz << 4 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxX( int in )
|
||||
public int maxX( final int in )
|
||||
{
|
||||
return Math.min( in, ( this.cx + 1 ) << 4 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxZ( int in )
|
||||
public int maxZ( final int in )
|
||||
{
|
||||
return Math.min( in, ( this.cz + 1 ) << 4 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlock( int x, int y, int z )
|
||||
public Block getBlock( final int x, final int y, final int z )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -60,7 +60,7 @@ public class ChunkOnly extends StandardWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlock( int x, int y, int z, Block blk )
|
||||
public void setBlock( final int x, final int y, final int z, final Block blk )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -70,7 +70,7 @@ public class ChunkOnly extends StandardWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlock( int x, int y, int z, IBlockState state, int flags )
|
||||
public void setBlock( final int x, final int y, final int z, final IBlockState state, final int flags )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -89,7 +89,7 @@ public class ChunkOnly extends StandardWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean range( int x, int y, int z )
|
||||
public boolean range( final int x, final int y, final int z )
|
||||
{
|
||||
return this.cx == ( x >> 4 ) && this.cz == ( z >> 4 );
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class Fallout
|
||||
private final MeteoriteBlockPutter putter;
|
||||
private final IBlockDefinition skyStoneDefinition;
|
||||
|
||||
public Fallout( MeteoriteBlockPutter putter, IBlockDefinition skyStoneDefinition )
|
||||
public Fallout( final MeteoriteBlockPutter putter, final IBlockDefinition skyStoneDefinition )
|
||||
{
|
||||
this.putter = putter;
|
||||
this.skyStoneDefinition = skyStoneDefinition;
|
||||
@@ -23,9 +23,9 @@ public class Fallout
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void getRandomFall( IMeteoriteWorld w, int x, int y, int z )
|
||||
public void getRandomFall( final IMeteoriteWorld w, final int x, final int y, final int z )
|
||||
{
|
||||
double a = Math.random();
|
||||
final double a = Math.random();
|
||||
if( a > 0.9 )
|
||||
{
|
||||
this.putter.put( w, x, y, z, Blocks.stone );
|
||||
@@ -44,9 +44,9 @@ public class Fallout
|
||||
}
|
||||
}
|
||||
|
||||
public void getRandomInset( IMeteoriteWorld w, int x, int y, int z )
|
||||
public void getRandomInset( final IMeteoriteWorld w, final int x, final int y, final int z )
|
||||
{
|
||||
double a = Math.random();
|
||||
final double a = Math.random();
|
||||
if( a > 0.9 )
|
||||
{
|
||||
this.putter.put( w, x, y, z, Blocks.cobblestone );
|
||||
@@ -61,7 +61,7 @@ public class Fallout
|
||||
}
|
||||
else if( a > 0.6 )
|
||||
{
|
||||
for( Block skyStoneBlock : this.skyStoneDefinition.maybeBlock().asSet() )
|
||||
for( final Block skyStoneBlock : this.skyStoneDefinition.maybeBlock().asSet() )
|
||||
{
|
||||
this.putter.put( w, x, y, z, skyStoneBlock );
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class FalloutCopy extends Fallout
|
||||
private final IBlockState block;
|
||||
private final MeteoriteBlockPutter putter;
|
||||
|
||||
public FalloutCopy( IMeteoriteWorld w, int x, int y, int z, MeteoriteBlockPutter putter, IBlockDefinition skyStoneDefinition )
|
||||
public FalloutCopy( final IMeteoriteWorld w, final int x, final int y, final int z, final MeteoriteBlockPutter putter, final IBlockDefinition skyStoneDefinition )
|
||||
{
|
||||
super( putter, skyStoneDefinition );
|
||||
this.putter = putter;
|
||||
@@ -23,9 +23,9 @@ public class FalloutCopy extends Fallout
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRandomFall( IMeteoriteWorld w, int x, int y, int z )
|
||||
public void getRandomFall( final IMeteoriteWorld w, final int x, final int y, final int z )
|
||||
{
|
||||
double a = Math.random();
|
||||
final double a = Math.random();
|
||||
if( a > SPECIFIED_BLOCK_THRESHOLD )
|
||||
{
|
||||
this.putter.put( w, x, y, z, this.block, 3 );
|
||||
@@ -36,15 +36,15 @@ public class FalloutCopy extends Fallout
|
||||
}
|
||||
}
|
||||
|
||||
public void getOther( IMeteoriteWorld w, int x, int y, int z, double a )
|
||||
public void getOther( final IMeteoriteWorld w, final int x, final int y, final int z, final double a )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getRandomInset( IMeteoriteWorld w, int x, int y, int z )
|
||||
public void getRandomInset( final IMeteoriteWorld w, final int x, final int y, final int z )
|
||||
{
|
||||
double a = Math.random();
|
||||
final double a = Math.random();
|
||||
if( a > SPECIFIED_BLOCK_THRESHOLD )
|
||||
{
|
||||
this.putter.put( w, x, y, z, this.block, 3 );
|
||||
|
||||
@@ -10,7 +10,7 @@ public class FalloutSand extends FalloutCopy
|
||||
public static final double GLASS_THRESHOLD = 0.66;
|
||||
private final MeteoriteBlockPutter putter;
|
||||
|
||||
public FalloutSand( IMeteoriteWorld w, int x, int y, int z, MeteoriteBlockPutter putter, IBlockDefinition skyStoneDefinition )
|
||||
public FalloutSand( final IMeteoriteWorld w, final int x, final int y, final int z, final MeteoriteBlockPutter putter, final IBlockDefinition skyStoneDefinition )
|
||||
{
|
||||
super( w, x, y, z, putter, skyStoneDefinition );
|
||||
this.putter = putter;
|
||||
@@ -23,7 +23,7 @@ public class FalloutSand extends FalloutCopy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getOther( IMeteoriteWorld w, int x, int y, int z, double a )
|
||||
public void getOther( final IMeteoriteWorld w, final int x, final int y, final int z, final double a )
|
||||
{
|
||||
if( a > GLASS_THRESHOLD )
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ public class FalloutSnow extends FalloutCopy
|
||||
public static final double ICE_THRESHOLD = 0.5;
|
||||
private final MeteoriteBlockPutter putter;
|
||||
|
||||
public FalloutSnow( IMeteoriteWorld w, int x, int y, int z, MeteoriteBlockPutter putter, IBlockDefinition skyStoneDefinition )
|
||||
public FalloutSnow( final IMeteoriteWorld w, final int x, final int y, final int z, final MeteoriteBlockPutter putter, final IBlockDefinition skyStoneDefinition )
|
||||
{
|
||||
super( w, x, y, z, putter, skyStoneDefinition );
|
||||
this.putter = putter;
|
||||
@@ -24,7 +24,7 @@ public class FalloutSnow extends FalloutCopy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getOther( IMeteoriteWorld w, int x, int y, int z, double a )
|
||||
public void getOther( final IMeteoriteWorld w, final int x, final int y, final int z, final double a )
|
||||
{
|
||||
if( a > SNOW_THRESHOLD )
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ import net.minecraft.init.Blocks;
|
||||
|
||||
public class MeteoriteBlockPutter
|
||||
{
|
||||
public boolean put( IMeteoriteWorld w, int i, int j, int k, Block blk )
|
||||
public boolean put( final IMeteoriteWorld w, final int i, final int j, final int k, final Block blk )
|
||||
{
|
||||
Block original = w.getBlock( i, j, k );
|
||||
final Block original = w.getBlock( i, j, k );
|
||||
|
||||
if( original == Blocks.bedrock || original == blk )
|
||||
{
|
||||
@@ -21,7 +21,7 @@ public class MeteoriteBlockPutter
|
||||
return true;
|
||||
}
|
||||
|
||||
public void put( IMeteoriteWorld w, int i, int j, int k, IBlockState state, int meta )
|
||||
public void put( final IMeteoriteWorld w, final int i, final int j, final int k, final IBlockState state, final int meta )
|
||||
{
|
||||
if( w.getBlock( i, j, k ) == Blocks.bedrock )
|
||||
{
|
||||
|
||||
@@ -15,31 +15,31 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
|
||||
protected final World w;
|
||||
|
||||
public StandardWorld( World w )
|
||||
public StandardWorld( final World w )
|
||||
{
|
||||
this.w = w;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minX( int in )
|
||||
public int minX( final int in )
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minZ( int in )
|
||||
public int minZ( final int in )
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxX( int in )
|
||||
public int maxX( final int in )
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxZ( int in )
|
||||
public int maxZ( final int in )
|
||||
{
|
||||
return in;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBlock( int x, int y, int z )
|
||||
public Block getBlock( final int x, final int y, final int z )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -61,7 +61,7 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockSeeTheSky( int x, int y, int z )
|
||||
public boolean canBlockSeeTheSky( final int x, final int y, final int z )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity getTileEntity( int x, int y, int z )
|
||||
public TileEntity getTileEntity( final int x, final int y, final int z )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlock( int x, int y, int z, Block blk )
|
||||
public void setBlock( final int x, final int y, final int z, final Block blk )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -101,18 +101,18 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
|
||||
}
|
||||
|
||||
public boolean range( int x, int y, int z )
|
||||
public boolean range( final int x, final int y, final int z )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlock(
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
IBlockState state,
|
||||
int l )
|
||||
final int x,
|
||||
final int y,
|
||||
final int z,
|
||||
final IBlockState state,
|
||||
final int l )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
@@ -122,9 +122,9 @@ public class StandardWorld implements IMeteoriteWorld
|
||||
|
||||
@Override
|
||||
public IBlockState getBlockState(
|
||||
int x,
|
||||
int y,
|
||||
int z )
|
||||
final int x,
|
||||
final int y,
|
||||
final int z )
|
||||
{
|
||||
if( this.range( x, y, z ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user