Puts everywhere brackets
This commit is contained in:
@@ -80,7 +80,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
public StackType injectItems( StackType input, Actionable mode, BaseActionSource src )
|
||||
{
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return this.getHandler().injectItems( input, mode, src );
|
||||
}
|
||||
return this.monitorDifference( input.copy(), this.getHandler().injectItems( input, mode, src ), false, src );
|
||||
}
|
||||
|
||||
@@ -94,12 +96,18 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
StackType diff = (StackType) original.copy();
|
||||
|
||||
if( extraction )
|
||||
{
|
||||
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
|
||||
}
|
||||
else if( leftOvers != null )
|
||||
{
|
||||
diff.decStackSize( leftOvers.getStackSize() );
|
||||
}
|
||||
|
||||
if( diff.getStackSize() != 0 )
|
||||
{
|
||||
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
||||
}
|
||||
|
||||
return leftOvers;
|
||||
}
|
||||
@@ -118,9 +126,13 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
||||
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
|
||||
if( receiver.isValid( o.getValue() ) )
|
||||
{
|
||||
receiver.postChange( this, diff, src );
|
||||
}
|
||||
else
|
||||
{
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +145,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src )
|
||||
{
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return this.getHandler().extractItems( request, mode, src );
|
||||
}
|
||||
return this.monitorDifference( request.copy(), this.getHandler().extractItems( request, mode, src ), true, src );
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,12 @@ public enum StorageChannel
|
||||
public IItemList createList()
|
||||
{
|
||||
if( this == ITEMS )
|
||||
{
|
||||
return AEApi.instance().storage().createItemList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return AEApi.instance().storage().createFluidList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,22 +105,34 @@ public class WorldCoord
|
||||
int zlen = Math.abs( oz );
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) )
|
||||
{
|
||||
return ForgeDirection.EAST;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) )
|
||||
{
|
||||
return ForgeDirection.WEST;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) )
|
||||
{
|
||||
return ForgeDirection.NORTH;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) )
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) )
|
||||
{
|
||||
return ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user