Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -58,7 +58,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
public void addCheckedInformation( ItemStack stack, EntityPlayer player, List<String> lines, boolean displayAdditionalInformation )
{
WorldCoord wc = this.getStoredSize( stack );
if ( wc.x > 0 )
if( wc.x > 0 )
lines.add( GuiText.StoredSize.getLocal() + ": " + wc.x + " x " + wc.y + " x " + wc.z );
}
@@ -77,20 +77,20 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
@Override
public World getWorld( ItemStack is )
{
if ( is.hasTagCompound() )
if( is.hasTagCompound() )
{
NBTTagCompound c = is.getTagCompound();
int dim = c.getInteger( "StorageDim" );
World w = DimensionManager.getWorld( dim );
if ( w == null )
if( w == null )
{
DimensionManager.initDimension( dim );
w = DimensionManager.getWorld( dim );
}
if ( w != null )
if( w != null )
{
if ( w.provider instanceof StorageWorldProvider )
if( w.provider instanceof StorageWorldProvider )
{
return w;
}
@@ -102,10 +102,10 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
@Override
public WorldCoord getStoredSize( ItemStack is )
{
if ( is.hasTagCompound() )
if( is.hasTagCompound() )
{
NBTTagCompound c = is.getTagCompound();
if ( Platform.isServer() )
if( Platform.isServer() )
{
int dim = c.getInteger( "StorageDim" );
return WorldSettings.getInstance().getStoredSize( dim );
@@ -120,10 +120,10 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
public WorldCoord getMin( ItemStack is )
{
World w = this.getWorld( is );
if ( w != null )
if( w != null )
{
NBTTagCompound info = ( NBTTagCompound ) w.getWorldInfo().getAdditionalProperty( "storageCell" );
if ( info != null )
NBTTagCompound info = (NBTTagCompound) w.getWorldInfo().getAdditionalProperty( "storageCell" );
if( info != null )
{
return new WorldCoord( info.getInteger( "minX" ), info.getInteger( "minY" ), info.getInteger( "minZ" ) );
}
@@ -135,10 +135,10 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
public WorldCoord getMax( ItemStack is )
{
World w = this.getWorld( is );
if ( w != null )
if( w != null )
{
NBTTagCompound info = ( NBTTagCompound ) w.getWorldInfo().getAdditionalProperty( "storageCell" );
if ( info != null )
NBTTagCompound info = (NBTTagCompound) w.getWorldInfo().getAdditionalProperty( "storageCell" );
if( info != null )
{
return new WorldCoord( info.getInteger( "maxX" ), info.getInteger( "maxY" ), info.getInteger( "maxZ" ) );
}
@@ -159,15 +159,14 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
int floorBuffer = 64;
World destination = this.getWorld( is );
if ( ( scale.x == 0 && scale.y == 0 && scale.z == 0 ) || ( scale.x == targetX && scale.y == targetY && scale.z == targetZ ) )
if( ( scale.x == 0 && scale.y == 0 && scale.z == 0 ) || ( scale.x == targetX && scale.y == targetY && scale.z == targetZ ) )
{
if ( targetX <= maxSize && targetY <= maxSize && targetZ <= maxSize )
if( targetX <= maxSize && targetY <= maxSize && targetZ <= maxSize )
{
if ( destination == null )
if( destination == null )
destination = this.createNewWorld( is );
StorageHelper.getInstance()
.swapRegions( w, destination, min.x + 1, min.y + 1, min.z + 1, 1, floorBuffer + 1, 1, targetX - 1, targetY - 1, targetZ - 1 );
StorageHelper.getInstance().swapRegions( w, destination, min.x + 1, min.y + 1, min.z + 1, 1, floorBuffer + 1, 1, targetX - 1, targetY - 1, targetZ - 1 );
this.setStoredSize( is, targetX, targetY, targetZ );
return new TransitionResult( true, 0 );
@@ -189,7 +188,7 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
private void setStoredSize( ItemStack is, int targetX, int targetY, int targetZ )
{
if ( is.hasTagCompound() )
if( is.hasTagCompound() )
{
NBTTagCompound c = is.getTagCompound();
int dim = c.getInteger( "StorageDim" );
@@ -199,5 +198,4 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
WorldSettings.getInstance().setStoredSize( dim, targetX, targetY, targetZ );
}
}
}