Reduce scope of variables

This commit is contained in:
thatsIch
2015-09-30 14:22:21 +02:00
parent dca09fe0a6
commit 059523f543
70 changed files with 151 additions and 199 deletions
@@ -127,7 +127,6 @@ public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
@Override
public IAEItemStack extractItems( IAEItemStack request, Actionable mode, BaseActionSource src )
{
ItemStack Gathered = null;
ItemStack Req = request.getItemStack();
int request_stackSize = Req.stackSize;
@@ -139,6 +138,7 @@ public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
Req.stackSize = request_stackSize;
ItemStack Gathered = null;
if( this.adaptor != null )
{
Gathered = this.adaptor.removeItems( Req.stackSize, Req, null );
@@ -140,12 +140,12 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>
public TickRateModulation onTick()
{
boolean changed = false;
LinkedList<IAEItemStack> changes = new LinkedList<IAEItemStack>();
int high = 0;
this.list.resetStatus();
int high = 0;
boolean changed = false;
for( ItemSlot is : this.adaptor )
{
CachedItemStack old = this.memory.get( is.slot );
@@ -166,10 +166,9 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
IGrid gn = n.getGrid();
if( gn != this.security.myGrid )
{
int playerID = -1;
ISecurityGrid sg = gn.getCache( ISecurityGrid.class );
playerID = sg.getOwner();
int playerID = sg.getOwner();
if( !this.security.hasPermission( playerID, permission ) )
{