Puts everywhere brackets

This commit is contained in:
thatsIch
2015-04-29 02:30:53 +02:00
parent 23aa8fd72d
commit 64ed05a1b4
465 changed files with 6726 additions and 14 deletions
@@ -57,13 +57,19 @@ public class PartConversionMonitor extends PartStorageMonitor
public boolean onPartShiftActivate( EntityPlayer player, Vec3 pos )
{
if( Platform.isClient() )
{
return true;
}
if( !this.proxy.isActive() )
{
return false;
}
if( !Platform.hasPermissions( this.getLocation(), player ) )
{
return false;
}
boolean ModeB = false;
@@ -79,7 +85,9 @@ public class PartConversionMonitor extends PartStorageMonitor
try
{
if( !this.proxy.isActive() )
{
return false;
}
IEnergySource energy = this.proxy.getEnergy();
IMEMonitor<IAEItemStack> cell = this.proxy.getStorage().getItemInventory();
@@ -122,7 +130,9 @@ public class PartConversionMonitor extends PartStorageMonitor
try
{
if( !this.proxy.isActive() )
{
return;
}
IEnergySource energy = this.proxy.getEnergy();
IMEMonitor<IAEItemStack> cell = this.proxy.getStorage().getItemInventory();
@@ -144,7 +154,9 @@ public class PartConversionMonitor extends PartStorageMonitor
}
if( player.openContainer != null )
{
player.openContainer.detectAndSendChanges();
}
}
}
catch( GridAccessException e )
@@ -54,8 +54,12 @@ public class PartCraftingTerminal extends PartTerminal
super.getDrops( drops, wrenched );
for( ItemStack is : this.craftingGrid )
{
if( is != null )
{
drops.add( is );
}
}
}
@Override
@@ -86,7 +90,9 @@ public class PartCraftingTerminal extends PartTerminal
}
if( GuiBridge.GUI_CRAFTING_TERMINAL.hasPermissions( this.getHost().getTile(), x, y, z, this.side, p ) )
{
return GuiBridge.GUI_CRAFTING_TERMINAL;
}
return GuiBridge.GUI_ME;
}
@@ -100,7 +106,9 @@ public class PartCraftingTerminal extends PartTerminal
public IInventory getInventoryByName( String name )
{
if( name.equals( "crafting" ) )
{
return this.craftingGrid;
}
return super.getInventoryByName( name );
}
}
@@ -47,7 +47,9 @@ public class PartInterfaceTerminal extends PartMonitor
if( !player.isSneaking() )
{
if( Platform.isClient() )
{
return true;
}
Platform.openGUI( player, this.getHost().getTile(), this.side, GuiBridge.GUI_INTERFACE_TERMINAL );
@@ -80,14 +80,18 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
this.proxy.setIdlePowerUsage( 1.0 / 2.0 );
}
else
{
this.proxy.setIdlePowerUsage( 1.0 / 16.0 ); // lights drain a little bit.
}
}
@MENetworkEventSubscribe
public void bootingRender( MENetworkBootingStatusChange c )
{
if( this.notLightSource )
{
this.getHost().markForUpdate();
}
}
@MENetworkEventSubscribe
@@ -210,9 +214,13 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
try
{
if( Platform.isServer() )
{
return this.proxy.getEnergy().isNetworkPowered();
}
else
{
return ( ( this.clientFlags & this.POWERED_FLAG ) == this.POWERED_FLAG );
}
}
catch( GridAccessException e )
{
@@ -232,7 +240,9 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
{
super.readFromNBT( data );
if( data.hasKey( "opacity" ) )
{
this.opacity = data.getFloat( "opacity" );
}
this.spin = data.getByte( "spin" );
}
@@ -253,13 +263,19 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
try
{
if( this.proxy.getEnergy().isNetworkPowered() )
{
this.clientFlags |= this.POWERED_FLAG;
}
if( this.proxy.getPath().isNetworkBooting() )
{
this.clientFlags |= this.BOOTING_FLAG;
}
if( this.proxy.getNode().meetsChannelRequirements() )
{
this.clientFlags |= this.CHANNEL_FLAG;
}
}
catch( GridAccessException e )
{
@@ -277,7 +293,9 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
this.clientFlags = data.readByte();
this.spin = (byte) ( this.clientFlags & 3 );
if( this.clientFlags == oldFlags )
{
return false;
}
return true;
}
@@ -297,7 +315,9 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
if( Platform.isServer() )
{
if( this.spin > 3 )
{
this.spin = 0;
}
switch( this.spin )
{
@@ -321,7 +341,9 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
return true;
}
else
{
return super.onPartActivate( player, pos );
}
}
@Override
@@ -331,17 +353,25 @@ public class PartMonitor extends AEBasePart implements IPartMonitor, IPowerChann
byte rotation = (byte) ( MathHelper.floor_double( ( player.rotationYaw * 4F ) / 360F + 2.5D ) & 3 );
if( side == ForgeDirection.UP )
{
this.spin = rotation;
}
else if( side == ForgeDirection.DOWN )
{
this.spin = rotation;
}
}
@Override
public boolean isActive()
{
if( this.notLightSource )
{
return ( ( this.clientFlags & ( this.CHANNEL_FLAG | this.POWERED_FLAG ) ) == ( this.CHANNEL_FLAG | this.POWERED_FLAG ) );
}
else
{
return this.isPowered();
}
}
}
@@ -58,8 +58,12 @@ public class PartPatternTerminal extends PartTerminal
public void getDrops( List<ItemStack> drops, boolean wrenched )
{
for( ItemStack is : this.pattern )
{
if( is != null )
{
drops.add( is );
}
}
}
@Override
@@ -96,7 +100,9 @@ public class PartPatternTerminal extends PartTerminal
}
if( GuiBridge.GUI_PATTERN_TERMINAL.hasPermissions( this.getHost().getTile(), x, y, z, this.side, p ) )
{
return GuiBridge.GUI_PATTERN_TERMINAL;
}
return GuiBridge.GUI_ME;
}
@@ -144,7 +150,9 @@ public class PartPatternTerminal extends PartTerminal
{
ItemStack is = this.crafting.getStackInSlot( x );
if( is != null )
{
is.stackSize = 1;
}
}
}
}
@@ -164,13 +172,19 @@ public class PartPatternTerminal extends PartTerminal
public IInventory getInventoryByName( String name )
{
if( name.equals( "crafting" ) )
{
return this.crafting;
}
if( name.equals( "output" ) )
{
return this.output;
}
if( name.equals( "pattern" ) )
{
return this.pattern;
}
return super.getInventoryByName( name );
}
@@ -113,7 +113,9 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
NBTTagCompound myItem = new NBTTagCompound();
if( this.configuredItem != null )
{
this.configuredItem.writeToNBT( myItem );
}
data.setTag( "configuredItem", myItem );
}
@@ -127,7 +129,9 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
data.writeBoolean( this.isLocked );
data.writeBoolean( this.configuredItem != null );
if( this.configuredItem != null )
{
this.configuredItem.writeToPacket( data );
}
}
@Override
@@ -139,9 +143,13 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
this.isLocked = data.readBoolean();
boolean val = data.readBoolean();
if( val )
{
this.configuredItem = AEItemStack.loadItemStackFromPacket( data );
}
else
{
this.configuredItem = null;
}
this.updateList = true;
@@ -152,13 +160,19 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
public boolean onPartActivate( EntityPlayer player, Vec3 pos )
{
if( Platform.isClient() )
{
return true;
}
if( !this.proxy.isActive() )
{
return false;
}
if( !Platform.hasPermissions( this.getLocation(), player ) )
{
return false;
}
TileEntity te = this.tile;
ItemStack eq = player.getCurrentEquippedItem();
@@ -175,7 +189,9 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
this.getHost().markForUpdate();
}
else
{
this.extractItem( player );
}
return true;
}
@@ -184,14 +200,18 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
public void configureWatchers()
{
if( this.myWatcher != null )
{
this.myWatcher.clear();
}
try
{
if( this.configuredItem != null )
{
if( this.myWatcher != null )
{
this.myWatcher.add( this.configuredItem );
}
this.updateReportingValue( this.proxy.getStorage().getItemInventory() );
}
@@ -213,9 +233,13 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
{
IAEItemStack result = itemInventory.getStorageList().findPrecise( this.configuredItem );
if( result == null )
{
this.configuredItem.setStackSize( 0 );
}
else
{
this.configuredItem.setStackSize( result.getStackSize() );
}
}
}
@@ -225,7 +249,9 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
{
super.finalize();
if( this.dspList != null )
{
GLAllocation.deleteDisplayLists( this.dspList );
}
}
@Override
@@ -233,12 +259,16 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
public void renderDynamic( double x, double y, double z, IPartRenderHelper rh, RenderBlocks renderer )
{
if( this.dspList == null )
{
this.dspList = GLAllocation.generateDisplayLists( 1 );
}
Tessellator tess = Tessellator.instance;
if( ( this.clientFlags & ( this.POWERED_FLAG | this.CHANNEL_FLAG ) ) != ( this.POWERED_FLAG | this.CHANNEL_FLAG ) )
{
return;
}
IAEItemStack ais = (IAEItemStack) this.getDisplayed();
if( ais != null )
@@ -254,7 +284,9 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
GL11.glEndList();
}
else
{
GL11.glCallList( this.dspList );
}
GL11.glPopMatrix();
}
@@ -375,9 +407,13 @@ public class PartStorageMonitor extends PartMonitor implements IPartStorageMonit
if( this.configuredItem != null )
{
if( fullStack == null )
{
this.configuredItem.setStackSize( 0 );
}
else
{
this.configuredItem.setStackSize( fullStack.getStackSize() );
}
this.getHost().markForUpdate();
}
@@ -72,8 +72,12 @@ public class PartTerminal extends PartMonitor implements ITerminalHost, IConfigM
super.getDrops( drops, wrenched );
for( ItemStack is : this.viewCell )
{
if( is != null )
{
drops.add( is );
}
}
}
@Override
@@ -106,7 +110,9 @@ public class PartTerminal extends PartMonitor implements ITerminalHost, IConfigM
if( !player.isSneaking() )
{
if( Platform.isClient() )
{
return true;
}
Platform.openGUI( player, this.getHost().getTile(), this.side, this.getGui( player ) );