Changed access to use this qualifier
This commit is contained in:
@@ -62,10 +62,10 @@ public class PartCableAnchor implements IPart
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
|
||||
IIcon myIcon = is.getIconIndex();
|
||||
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
|
||||
IIcon myIcon = this.is.getIconIndex();
|
||||
rh.setTexture( myIcon );
|
||||
if ( host != null && host.getFacadeContainer().getFacade( mySide ) != null )
|
||||
if ( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
|
||||
rh.setBounds( 7, 7, 10, 9, 9, 14 );
|
||||
else
|
||||
rh.setBounds( 7, 7, 10, 9, 9, 16 );
|
||||
@@ -84,7 +84,7 @@ public class PartCableAnchor implements IPart
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(IPartRenderHelper instance, RenderBlocks renderer)
|
||||
{
|
||||
instance.setTexture( is.getIconIndex() );
|
||||
instance.setTexture( this.is.getIconIndex() );
|
||||
instance.setBounds( 7, 7, 4, 9, 9, 14 );
|
||||
instance.renderInventoryBox( renderer );
|
||||
instance.setTexture( null );
|
||||
@@ -93,7 +93,7 @@ public class PartCableAnchor implements IPart
|
||||
@Override
|
||||
public void getBoxes(IPartCollisionHelper bch)
|
||||
{
|
||||
if ( host != null && host.getFacadeContainer().getFacade( mySide ) != null )
|
||||
if ( this.host != null && this.host.getFacadeContainer().getFacade( this.mySide ) != null )
|
||||
bch.addBox( 7, 7, 10, 9, 9, 14 );
|
||||
else
|
||||
bch.addBox( 7, 7, 10, 9, 9, 16 );
|
||||
@@ -102,7 +102,7 @@ public class PartCableAnchor implements IPart
|
||||
@Override
|
||||
public ItemStack getItemStack(PartItemStack wrenched)
|
||||
{
|
||||
return is;
|
||||
return this.is;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -212,7 +212,7 @@ public class PartCableAnchor implements IPart
|
||||
public void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile)
|
||||
{
|
||||
this.host = host;
|
||||
mySide = side;
|
||||
this.mySide = side;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -236,7 +236,7 @@ public class PartCableAnchor implements IPart
|
||||
@Override
|
||||
public boolean isLadder(EntityLivingBase entity)
|
||||
{
|
||||
return mySide.offsetY == 0 && ( entity.isCollidedHorizontally || ! entity.onGround );
|
||||
return this.mySide.offsetY == 0 && ( entity.isCollidedHorizontally || ! entity.onGround );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
ISidedInventory, IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost
|
||||
{
|
||||
|
||||
final DualityInterface duality = new DualityInterface( proxy, this );
|
||||
final DualityInterface duality = new DualityInterface( this.proxy, this );
|
||||
|
||||
public PartInterface(ItemStack is) {
|
||||
super( PartInterface.class, is );
|
||||
@@ -83,45 +83,45 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
public void addToWorld()
|
||||
{
|
||||
super.addToWorld();
|
||||
duality.initialize();
|
||||
this.duality.initialize();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void stateChange(MENetworkChannelsChanged c)
|
||||
{
|
||||
duality.notifyNeighbors();
|
||||
this.duality.notifyNeighbors();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void stateChange(MENetworkPowerStatusChange c)
|
||||
{
|
||||
duality.notifyNeighbors();
|
||||
this.duality.notifyNeighbors();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gridChanged()
|
||||
{
|
||||
duality.gridChanged();
|
||||
this.duality.gridChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound data)
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
duality.writeToNBT( data );
|
||||
this.duality.writeToNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data)
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
duality.readFromNBT( data );
|
||||
this.duality.readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDrops(List<ItemStack> drops, boolean wrenched)
|
||||
{
|
||||
duality.addDrops( drops );
|
||||
this.duality.addDrops( drops );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +129,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
public void renderInventory(IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
this.is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
rh.setBounds( 3, 3, 15, 13, 13, 16 );
|
||||
rh.renderInventoryBox( renderer );
|
||||
@@ -145,33 +145,33 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
|
||||
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
this.is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
rh.setBounds( 2, 2, 14, 14, 14, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
this.is.getIconIndex(), CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon() );
|
||||
|
||||
rh.setBounds( 5, 5, 12, 11, 11, 13 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), this.is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorSidesStatus.getIcon() );
|
||||
|
||||
rh.setBounds( 5, 5, 13, 11, 11, 14 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
renderLights( x, y, z, rh, renderer );
|
||||
this.renderLights( x, y, z, rh, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBreakingTexture()
|
||||
{
|
||||
return is.getIconIndex();
|
||||
return this.is.getIconIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -196,127 +196,127 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
@Override
|
||||
public boolean canInsert(ItemStack stack)
|
||||
{
|
||||
return duality.canInsert( stack );
|
||||
return this.duality.canInsert( stack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor<IAEItemStack> getItemInventory()
|
||||
{
|
||||
return duality.getItemInventory();
|
||||
return this.duality.getItemInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor<IAEFluidStack> getFluidInventory()
|
||||
{
|
||||
return duality.getFluidInventory();
|
||||
return this.duality.getFluidInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickingRequest getTickingRequest(IGridNode node)
|
||||
{
|
||||
return duality.getTickingRequest( node );
|
||||
return this.duality.getTickingRequest( node );
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall)
|
||||
{
|
||||
return duality.tickingRequest( node, TicksSinceLastCall );
|
||||
return this.duality.tickingRequest( node, TicksSinceLastCall );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{
|
||||
return duality.getStorage().getSizeInventory();
|
||||
return this.duality.getStorage().getSizeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i)
|
||||
{
|
||||
return duality.getStorage().getStackInSlot( i );
|
||||
return this.duality.getStorage().getStackInSlot( i );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j)
|
||||
{
|
||||
return duality.getStorage().decrStackSize( i, j );
|
||||
return this.duality.getStorage().decrStackSize( i, j );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i)
|
||||
{
|
||||
return duality.getStorage().getStackInSlotOnClosing( i );
|
||||
return this.duality.getStorage().getStackInSlotOnClosing( i );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack)
|
||||
{
|
||||
duality.getStorage().setInventorySlotContents( i, itemstack );
|
||||
this.duality.getStorage().setInventorySlotContents( i, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName()
|
||||
{
|
||||
return duality.getStorage().getInventoryName();
|
||||
return this.duality.getStorage().getInventoryName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName()
|
||||
{
|
||||
return duality.getStorage().hasCustomInventoryName();
|
||||
return this.duality.getStorage().hasCustomInventoryName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{
|
||||
return duality.getStorage().getInventoryStackLimit();
|
||||
return this.duality.getStorage().getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IConfigManager getConfigManager()
|
||||
{
|
||||
return duality.getConfigManager();
|
||||
return this.duality.getConfigManager();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getInventoryByName(String name)
|
||||
{
|
||||
return duality.getInventoryByName( name );
|
||||
return this.duality.getInventoryByName( name );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty()
|
||||
{
|
||||
duality.getStorage().markDirty();
|
||||
this.duality.getStorage().markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer)
|
||||
{
|
||||
return duality.getStorage().isUseableByPlayer( entityplayer );
|
||||
return this.duality.getStorage().isUseableByPlayer( entityplayer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory()
|
||||
{
|
||||
duality.getStorage().openInventory();
|
||||
this.duality.getStorage().openInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
duality.getStorage().closeInventory();
|
||||
this.duality.getStorage().closeInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
return duality.getStorage().isItemValidForSlot( i, itemstack );
|
||||
return this.duality.getStorage().isItemValidForSlot( i, itemstack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int s)
|
||||
{
|
||||
return duality.getAccessibleSlotsFromSide( s );
|
||||
return this.duality.getAccessibleSlotsFromSide( s );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -334,13 +334,13 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
@Override
|
||||
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack)
|
||||
{
|
||||
duality.onChangeInventory( inv, slot, mc, removedStack, newStack );
|
||||
this.duality.onChangeInventory( inv, slot, mc, removedStack, newStack );
|
||||
}
|
||||
|
||||
@Override
|
||||
public DualityInterface getInterfaceDuality()
|
||||
{
|
||||
return duality;
|
||||
return this.duality;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -350,7 +350,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
return false;
|
||||
|
||||
if ( Platform.isServer() )
|
||||
Platform.openGUI( p, getTileEntity(), side, GuiBridge.GUI_INTERFACE );
|
||||
Platform.openGUI( p, this.getTileEntity(), this.side, GuiBridge.GUI_INTERFACE );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -358,67 +358,67 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
@Override
|
||||
public IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src)
|
||||
{
|
||||
return duality.getMonitorable( side, src, this );
|
||||
return this.duality.getMonitorable( side, src, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table)
|
||||
{
|
||||
return duality.pushPattern( patternDetails, table );
|
||||
return this.duality.pushPattern( patternDetails, table );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void provideCrafting(ICraftingProviderHelper craftingTracker)
|
||||
{
|
||||
duality.provideCrafting( craftingTracker );
|
||||
this.duality.provideCrafting( craftingTracker );
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getTargets()
|
||||
{
|
||||
return EnumSet.of( side );
|
||||
return EnumSet.of( this.side );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBusy()
|
||||
{
|
||||
return duality.isBusy();
|
||||
return this.duality.isBusy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInstalledUpgrades(Upgrades u)
|
||||
{
|
||||
return duality.getInstalledUpgrades( u );
|
||||
return this.duality.getInstalledUpgrades( u );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs()
|
||||
{
|
||||
return duality.getRequestedJobs();
|
||||
return this.duality.getRequestedJobs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode)
|
||||
{
|
||||
return duality.injectCraftedItems( link, items, mode );
|
||||
return this.duality.injectCraftedItems( link, items, mode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobStateChange(ICraftingLink link)
|
||||
{
|
||||
duality.jobStateChange( link );
|
||||
this.duality.jobStateChange( link );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return duality.getPriority();
|
||||
return this.duality.getPriority();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPriority(int newValue)
|
||||
{
|
||||
duality.setPriority( newValue );
|
||||
this.duality.setPriority( newValue );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ public class PartInvertedToggleBus extends PartToggleBus
|
||||
|
||||
public PartInvertedToggleBus(ItemStack is) {
|
||||
super( PartInvertedToggleBus.class, is );
|
||||
proxy.setIdlePowerUsage( 0.0 );
|
||||
outerProxy.setIdlePowerUsage( 0.0 );
|
||||
proxy.setFlags();
|
||||
outerProxy.setFlags();
|
||||
this.proxy.setIdlePowerUsage( 0.0 );
|
||||
this.outerProxy.setIdlePowerUsage( 0.0 );
|
||||
this.proxy.setFlags();
|
||||
this.outerProxy.setFlags();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -102,10 +102,10 @@ public class PartStorageBus
|
||||
public PartStorageBus( ItemStack is )
|
||||
{
|
||||
super( PartStorageBus.class, is );
|
||||
getConfigManager().registerSetting( Settings.ACCESS, AccessRestriction.READ_WRITE );
|
||||
getConfigManager().registerSetting( Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
getConfigManager().registerSetting( Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
|
||||
mySrc = new MachineSource( this );
|
||||
this.getConfigManager().registerSetting( Settings.ACCESS, AccessRestriction.READ_WRITE );
|
||||
this.getConfigManager().registerSetting( Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.getConfigManager().registerSetting( Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
|
||||
this.mySrc = new MachineSource( this );
|
||||
}
|
||||
|
||||
boolean cached = false;
|
||||
@@ -119,25 +119,25 @@ public class PartStorageBus
|
||||
@MENetworkEventSubscribe
|
||||
public void powerRender( MENetworkPowerStatusChange c )
|
||||
{
|
||||
updateStatus();
|
||||
this.updateStatus();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void updateChannels( MENetworkChannelsChanged changedChannels )
|
||||
{
|
||||
updateStatus();
|
||||
this.updateStatus();
|
||||
}
|
||||
|
||||
private void updateStatus()
|
||||
{
|
||||
boolean currentActive = proxy.isActive();
|
||||
if ( wasActive != currentActive )
|
||||
boolean currentActive = this.proxy.isActive();
|
||||
if ( this.wasActive != currentActive )
|
||||
{
|
||||
wasActive = currentActive;
|
||||
this.wasActive = currentActive;
|
||||
try
|
||||
{
|
||||
proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
||||
host.markForUpdate();
|
||||
this.proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
||||
this.host.markForUpdate();
|
||||
}
|
||||
catch ( GridAccessException e )
|
||||
{
|
||||
@@ -154,7 +154,7 @@ public class PartStorageBus
|
||||
if ( Platform.isClient() )
|
||||
return true;
|
||||
|
||||
Platform.openGUI( player, getHost().getTile(), side, GuiBridge.GUI_STORAGEBUS );
|
||||
Platform.openGUI( player, this.getHost().getTile(), this.side, GuiBridge.GUI_STORAGEBUS );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -170,14 +170,14 @@ public class PartStorageBus
|
||||
@Override
|
||||
public boolean isValid( Object verificationToken )
|
||||
{
|
||||
return handler == verificationToken;
|
||||
return this.handler == verificationToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getInventoryByName( String name )
|
||||
{
|
||||
if ( name.equals( "config" ) )
|
||||
return Config;
|
||||
return this.Config;
|
||||
|
||||
return super.getInventoryByName( name );
|
||||
}
|
||||
@@ -186,17 +186,17 @@ public class PartStorageBus
|
||||
|
||||
private void resetCache( boolean fullReset )
|
||||
{
|
||||
if ( host == null || host.getTile() == null || host.getTile().getWorldObj() == null || host.getTile().getWorldObj().isRemote )
|
||||
if ( this.host == null || this.host.getTile() == null || this.host.getTile().getWorldObj() == null || this.host.getTile().getWorldObj().isRemote )
|
||||
return;
|
||||
|
||||
if ( fullReset )
|
||||
resetCacheLogic = 2;
|
||||
this.resetCacheLogic = 2;
|
||||
else
|
||||
resetCacheLogic = 1;
|
||||
this.resetCacheLogic = 1;
|
||||
|
||||
try
|
||||
{
|
||||
proxy.getTick().alertDevice( proxy.getNode() );
|
||||
this.proxy.getTick().alertDevice( this.proxy.getNode() );
|
||||
}
|
||||
catch ( GridAccessException e )
|
||||
{
|
||||
@@ -206,34 +206,34 @@ public class PartStorageBus
|
||||
|
||||
private void resetCache()
|
||||
{
|
||||
boolean fullReset = resetCacheLogic == 2;
|
||||
resetCacheLogic = 0;
|
||||
boolean fullReset = this.resetCacheLogic == 2;
|
||||
this.resetCacheLogic = 0;
|
||||
|
||||
IMEInventory<IAEItemStack> in = getInternalHandler();
|
||||
IMEInventory<IAEItemStack> in = this.getInternalHandler();
|
||||
IItemList<IAEItemStack> before = AEApi.instance().storage().createItemList();
|
||||
if ( in != null )
|
||||
before = in.getAvailableItems( before );
|
||||
|
||||
cached = false;
|
||||
this.cached = false;
|
||||
if ( fullReset )
|
||||
handlerHash = 0;
|
||||
this.handlerHash = 0;
|
||||
|
||||
IMEInventory<IAEItemStack> out = getInternalHandler();
|
||||
IMEInventory<IAEItemStack> out = this.getInternalHandler();
|
||||
|
||||
if ( monitor != null )
|
||||
monitor.onTick();
|
||||
if ( this.monitor != null )
|
||||
this.monitor.onTick();
|
||||
|
||||
IItemList<IAEItemStack> after = AEApi.instance().storage().createItemList();
|
||||
if ( out != null )
|
||||
after = out.getAvailableItems( after );
|
||||
|
||||
Platform.postListChanges( before, after, this, mySrc );
|
||||
Platform.postListChanges( before, after, this, this.mySrc );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged()
|
||||
{
|
||||
resetCache( false );
|
||||
this.resetCache( false );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -241,119 +241,119 @@ public class PartStorageBus
|
||||
{
|
||||
super.onChangeInventory( inv, slot, mc, removedStack, newStack );
|
||||
|
||||
if ( inv == Config )
|
||||
resetCache( true );
|
||||
if ( inv == this.Config )
|
||||
this.resetCache( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upgradesChanged()
|
||||
{
|
||||
super.upgradesChanged();
|
||||
resetCache( true );
|
||||
this.resetCache( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
||||
{
|
||||
resetCache( true );
|
||||
host.markForSave();
|
||||
this.resetCache( true );
|
||||
this.host.markForSave();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPriority( int newValue )
|
||||
{
|
||||
priority = newValue;
|
||||
host.markForSave();
|
||||
resetCache( true );
|
||||
this.priority = newValue;
|
||||
this.host.markForSave();
|
||||
this.resetCache( true );
|
||||
}
|
||||
|
||||
public MEInventoryHandler getInternalHandler()
|
||||
{
|
||||
if ( cached )
|
||||
return handler;
|
||||
if ( this.cached )
|
||||
return this.handler;
|
||||
|
||||
boolean wasSleeping = monitor == null;
|
||||
boolean wasSleeping = this.monitor == null;
|
||||
|
||||
cached = true;
|
||||
TileEntity self = getHost().getTile();
|
||||
TileEntity target = self.getWorldObj().getTileEntity( self.xCoord + side.offsetX, self.yCoord + side.offsetY, self.zCoord + side.offsetZ );
|
||||
this.cached = true;
|
||||
TileEntity self = this.getHost().getTile();
|
||||
TileEntity target = self.getWorldObj().getTileEntity( self.xCoord + this.side.offsetX, self.yCoord + this.side.offsetY, self.zCoord + this.side.offsetZ );
|
||||
|
||||
int newHandlerHash = Platform.generateTileHash( target );
|
||||
|
||||
if ( handlerHash == newHandlerHash && handlerHash != 0 )
|
||||
return handler;
|
||||
if ( this.handlerHash == newHandlerHash && this.handlerHash != 0 )
|
||||
return this.handler;
|
||||
|
||||
try
|
||||
{
|
||||
// force grid to update handlers...
|
||||
proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
||||
this.proxy.getGrid().postEvent( new MENetworkCellArrayUpdate() );
|
||||
}
|
||||
catch ( GridAccessException e )
|
||||
{
|
||||
// :3
|
||||
}
|
||||
|
||||
handlerHash = newHandlerHash;
|
||||
handler = null;
|
||||
monitor = null;
|
||||
this.handlerHash = newHandlerHash;
|
||||
this.handler = null;
|
||||
this.monitor = null;
|
||||
if ( target != null )
|
||||
{
|
||||
IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, side.getOpposite(), StorageChannel.ITEMS, mySrc );
|
||||
IExternalStorageHandler esh = AEApi.instance().registries().externalStorage().getHandler( target, this.side.getOpposite(), StorageChannel.ITEMS, this.mySrc );
|
||||
if ( esh != null )
|
||||
{
|
||||
IMEInventory inv = esh.getInventory( target, side.getOpposite(), StorageChannel.ITEMS, mySrc );
|
||||
IMEInventory inv = esh.getInventory( target, this.side.getOpposite(), StorageChannel.ITEMS, this.mySrc );
|
||||
|
||||
if ( inv instanceof MEMonitorIInventory )
|
||||
{
|
||||
MEMonitorIInventory h = ( MEMonitorIInventory ) inv;
|
||||
h.mode = ( StorageFilter ) getConfigManager().getSetting( Settings.STORAGE_FILTER );
|
||||
h.mode = ( StorageFilter ) this.getConfigManager().getSetting( Settings.STORAGE_FILTER );
|
||||
h.mySource = new MachineSource( this );
|
||||
}
|
||||
|
||||
if ( inv instanceof MEMonitorIInventory )
|
||||
monitor = ( MEMonitorIInventory ) inv;
|
||||
this.monitor = ( MEMonitorIInventory ) inv;
|
||||
|
||||
if ( inv != null )
|
||||
{
|
||||
checkInterfaceVsStorageBus( target, side.getOpposite() );
|
||||
this.checkInterfaceVsStorageBus( target, this.side.getOpposite() );
|
||||
|
||||
handler = new MEInventoryHandler( inv, StorageChannel.ITEMS );
|
||||
this.handler = new MEInventoryHandler( inv, StorageChannel.ITEMS );
|
||||
|
||||
handler.myAccess = ( AccessRestriction ) this.getConfigManager().getSetting( Settings.ACCESS );
|
||||
handler.myWhitelist = getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST;
|
||||
handler.myPriority = priority;
|
||||
this.handler.myAccess = ( AccessRestriction ) this.getConfigManager().getSetting( Settings.ACCESS );
|
||||
this.handler.myWhitelist = this.getInstalledUpgrades( Upgrades.INVERTER ) > 0 ? IncludeExclude.BLACKLIST : IncludeExclude.WHITELIST;
|
||||
this.handler.myPriority = this.priority;
|
||||
|
||||
IItemList<IAEItemStack> priorityList = AEApi.instance().storage().createItemList();
|
||||
|
||||
int slotsToUse = 18 + getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
|
||||
for ( int x = 0; x < Config.getSizeInventory() && x < slotsToUse; x++ )
|
||||
int slotsToUse = 18 + this.getInstalledUpgrades( Upgrades.CAPACITY ) * 9;
|
||||
for ( int x = 0; x < this.Config.getSizeInventory() && x < slotsToUse; x++ )
|
||||
{
|
||||
IAEItemStack is = Config.getAEStackInSlot( x );
|
||||
IAEItemStack is = this.Config.getAEStackInSlot( x );
|
||||
if ( is != null )
|
||||
priorityList.add( is );
|
||||
}
|
||||
|
||||
if ( getInstalledUpgrades( Upgrades.FUZZY ) > 0 )
|
||||
handler.myPartitionList = new FuzzyPriorityList( priorityList, ( FuzzyMode ) this.getConfigManager().getSetting( Settings.FUZZY_MODE ) );
|
||||
if ( this.getInstalledUpgrades( Upgrades.FUZZY ) > 0 )
|
||||
this.handler.myPartitionList = new FuzzyPriorityList( priorityList, ( FuzzyMode ) this.getConfigManager().getSetting( Settings.FUZZY_MODE ) );
|
||||
else
|
||||
handler.myPartitionList = new PrecisePriorityList( priorityList );
|
||||
this.handler.myPartitionList = new PrecisePriorityList( priorityList );
|
||||
|
||||
if ( inv instanceof IMEMonitor )
|
||||
( ( IMEMonitor ) inv ).addListener( this, handler );
|
||||
( ( IMEMonitor ) inv ).addListener( this, this.handler );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update sleep state...
|
||||
if ( wasSleeping != ( monitor == null ) )
|
||||
if ( wasSleeping != ( this.monitor == null ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
ITickManager tm = proxy.getTick();
|
||||
if ( monitor == null )
|
||||
tm.sleepDevice( proxy.getNode() );
|
||||
ITickManager tm = this.proxy.getTick();
|
||||
if ( this.monitor == null )
|
||||
tm.sleepDevice( this.proxy.getNode() );
|
||||
else
|
||||
tm.wakeDevice( proxy.getNode() );
|
||||
tm.wakeDevice( this.proxy.getNode() );
|
||||
}
|
||||
catch ( GridAccessException e )
|
||||
{
|
||||
@@ -361,7 +361,7 @@ public class PartStorageBus
|
||||
}
|
||||
}
|
||||
|
||||
return handler;
|
||||
return this.handler;
|
||||
}
|
||||
|
||||
private void checkInterfaceVsStorageBus( TileEntity target, ForgeDirection side )
|
||||
@@ -390,7 +390,7 @@ public class PartStorageBus
|
||||
public void renderInventory( IPartRenderHelper rh, RenderBlocks renderer )
|
||||
{
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
this.is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
|
||||
rh.setBounds( 3, 3, 15, 13, 13, 16 );
|
||||
rh.renderInventoryBox( renderer );
|
||||
@@ -406,8 +406,8 @@ public class PartStorageBus
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void renderStatic( int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer )
|
||||
{
|
||||
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(), is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(), this.is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
|
||||
rh.setBounds( 3, 3, 15, 13, 13, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
@@ -416,19 +416,19 @@ public class PartStorageBus
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
this.is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
|
||||
rh.setBounds( 5, 5, 12, 11, 11, 13 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), this.is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorSidesStatus.getIcon() );
|
||||
|
||||
rh.setBounds( 5, 5, 13, 11, 11, 14 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
renderLights( x, y, z, rh, renderer );
|
||||
this.renderLights( x, y, z, rh, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -448,17 +448,17 @@ public class PartStorageBus
|
||||
@Override
|
||||
public TickingRequest getTickingRequest( IGridNode node )
|
||||
{
|
||||
return new TickingRequest( TickRates.StorageBus.min, TickRates.StorageBus.max, monitor == null, true );
|
||||
return new TickingRequest( TickRates.StorageBus.min, TickRates.StorageBus.max, this.monitor == null, true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest( IGridNode node, int TicksSinceLastCall )
|
||||
{
|
||||
if ( resetCacheLogic != 0 )
|
||||
resetCache();
|
||||
if ( this.resetCacheLogic != 0 )
|
||||
this.resetCache();
|
||||
|
||||
if ( monitor != null )
|
||||
return monitor.onTick();
|
||||
if ( this.monitor != null )
|
||||
return this.monitor.onTick();
|
||||
|
||||
return TickRateModulation.SLEEP;
|
||||
}
|
||||
@@ -467,16 +467,16 @@ public class PartStorageBus
|
||||
public void writeToNBT( NBTTagCompound data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
Config.writeToNBT( data, "config" );
|
||||
data.setInteger( "priority", priority );
|
||||
this.Config.writeToNBT( data, "config" );
|
||||
data.setInteger( "priority", this.priority );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( NBTTagCompound data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
Config.readFromNBT( data, "config" );
|
||||
priority = data.getInteger( "priority" );
|
||||
this.Config.readFromNBT( data, "config" );
|
||||
this.priority = data.getInteger( "priority" );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -484,7 +484,7 @@ public class PartStorageBus
|
||||
{
|
||||
if ( channel == StorageChannel.ITEMS )
|
||||
{
|
||||
IMEInventoryHandler out = proxy.isActive() ? getInternalHandler() : null;
|
||||
IMEInventoryHandler out = this.proxy.isActive() ? this.getInternalHandler() : null;
|
||||
if ( out != null )
|
||||
return Collections.singletonList( out );
|
||||
}
|
||||
@@ -494,7 +494,7 @@ public class PartStorageBus
|
||||
@Override
|
||||
public int getPriority()
|
||||
{
|
||||
return priority;
|
||||
return this.priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -506,8 +506,8 @@ public class PartStorageBus
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( proxy.isActive() )
|
||||
proxy.getStorage().postAlterationOfStoredItems( StorageChannel.ITEMS, change, mySrc );
|
||||
if ( this.proxy.isActive() )
|
||||
this.proxy.getStorage().postAlterationOfStoredItems( StorageChannel.ITEMS, change, this.mySrc );
|
||||
}
|
||||
catch ( GridAccessException e )
|
||||
{
|
||||
@@ -519,7 +519,7 @@ public class PartStorageBus
|
||||
@Method( iname = "BC" )
|
||||
public ConnectOverride overridePipeConnection( PipeType type, ForgeDirection with )
|
||||
{
|
||||
return type == PipeType.ITEM && with == side ? ConnectOverride.CONNECT : ConnectOverride.DISCONNECT;
|
||||
return type == PipeType.ITEM && with == this.side ? ConnectOverride.CONNECT : ConnectOverride.DISCONNECT;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,34 +61,34 @@ public class PartToggleBus extends PartBasicState
|
||||
public void onPlacement(EntityPlayer player, ItemStack held, ForgeDirection side)
|
||||
{
|
||||
super.onPlacement( player, held, side );
|
||||
outerProxy.setOwner( player );
|
||||
this.outerProxy.setOwner( player );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int populateFlags(int cf)
|
||||
{
|
||||
return cf | (getIntention() ? REDSTONE_FLAG : 0);
|
||||
return cf | (this.getIntention() ? this.REDSTONE_FLAG : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborChanged()
|
||||
{
|
||||
boolean oldHasRedstone = hasRedstone;
|
||||
hasRedstone = getHost().hasRedstone( side );
|
||||
boolean oldHasRedstone = this.hasRedstone;
|
||||
this.hasRedstone = this.getHost().hasRedstone( this.side );
|
||||
|
||||
if ( hasRedstone != oldHasRedstone )
|
||||
if ( this.hasRedstone != oldHasRedstone )
|
||||
{
|
||||
updateInternalState();
|
||||
getHost().markForUpdate();
|
||||
this.updateInternalState();
|
||||
this.getHost().markForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public PartToggleBus(ItemStack is) {
|
||||
this( PartToggleBus.class, is );
|
||||
proxy.setIdlePowerUsage( 0.0 );
|
||||
outerProxy.setIdlePowerUsage( 0.0 );
|
||||
proxy.setFlags();
|
||||
outerProxy.setFlags();
|
||||
this.proxy.setIdlePowerUsage( 0.0 );
|
||||
this.outerProxy.setIdlePowerUsage( 0.0 );
|
||||
this.proxy.setFlags();
|
||||
this.outerProxy.setFlags();
|
||||
}
|
||||
|
||||
public PartToggleBus(Class cls, ItemStack is) {
|
||||
@@ -99,44 +99,44 @@ public class PartToggleBus extends PartBasicState
|
||||
public void setPartHostInfo(ForgeDirection side, IPartHost host, TileEntity tile)
|
||||
{
|
||||
super.setPartHostInfo( side, host, tile );
|
||||
outerProxy.setValidSides( EnumSet.of( side ) );
|
||||
this.outerProxy.setValidSides( EnumSet.of( side ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound extra)
|
||||
{
|
||||
super.readFromNBT( extra );
|
||||
outerProxy.readFromNBT( extra );
|
||||
this.outerProxy.readFromNBT( extra );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound extra)
|
||||
{
|
||||
super.writeToNBT( extra );
|
||||
outerProxy.writeToNBT( extra );
|
||||
this.outerProxy.writeToNBT( extra );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addToWorld()
|
||||
{
|
||||
super.addToWorld();
|
||||
outerProxy.onReady();
|
||||
hasRedstone = getHost().hasRedstone( side );
|
||||
updateInternalState();
|
||||
this.outerProxy.onReady();
|
||||
this.hasRedstone = this.getHost().hasRedstone( this.side );
|
||||
this.updateInternalState();
|
||||
}
|
||||
|
||||
private void updateInternalState()
|
||||
{
|
||||
boolean intention = getIntention();
|
||||
if ( intention == ( connection == null ) )
|
||||
boolean intention = this.getIntention();
|
||||
if ( intention == ( this.connection == null ) )
|
||||
{
|
||||
if ( proxy.getNode() != null && outerProxy.getNode() != null )
|
||||
if ( this.proxy.getNode() != null && this.outerProxy.getNode() != null )
|
||||
{
|
||||
if ( intention )
|
||||
{
|
||||
try
|
||||
{
|
||||
connection = AEApi.instance().createGridConnection( proxy.getNode(), outerProxy.getNode() );
|
||||
this.connection = AEApi.instance().createGridConnection( this.proxy.getNode(), this.outerProxy.getNode() );
|
||||
}
|
||||
catch (FailedConnection e)
|
||||
{
|
||||
@@ -145,8 +145,8 @@ public class PartToggleBus extends PartBasicState
|
||||
}
|
||||
else
|
||||
{
|
||||
connection.destroy();
|
||||
connection = null;
|
||||
this.connection.destroy();
|
||||
this.connection = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,20 +154,20 @@ public class PartToggleBus extends PartBasicState
|
||||
|
||||
protected boolean getIntention()
|
||||
{
|
||||
return getHost().hasRedstone( side );
|
||||
return this.getHost().hasRedstone( this.side );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFromWorld()
|
||||
{
|
||||
super.removeFromWorld();
|
||||
outerProxy.invalidate();
|
||||
this.outerProxy.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getExternalFacingNode()
|
||||
{
|
||||
return outerProxy.getNode();
|
||||
return this.outerProxy.getNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -179,16 +179,16 @@ public class PartToggleBus extends PartBasicState
|
||||
@Override
|
||||
public void setColors(boolean hasChan, boolean hasPower)
|
||||
{
|
||||
hasRedstone = (clientFlags & REDSTONE_FLAG) == REDSTONE_FLAG;
|
||||
super.setColors( hasChan && hasRedstone, hasPower && hasRedstone );
|
||||
this.hasRedstone = (this.clientFlags & this.REDSTONE_FLAG) == this.REDSTONE_FLAG;
|
||||
super.setColors( hasChan && this.hasRedstone, hasPower && this.hasRedstone );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer)
|
||||
{
|
||||
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
|
||||
rh.setTexture( is.getIconIndex() );
|
||||
this.renderCache = rh.useSimplifiedRendering( x, y, z, this, this.renderCache );
|
||||
rh.setTexture( this.is.getIconIndex() );
|
||||
|
||||
rh.setBounds( 6, 6, 14, 10, 10, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
@@ -197,19 +197,19 @@ public class PartToggleBus extends PartBasicState
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
rh.setTexture( CableBusTextures.PartMonitorSidesStatus.getIcon(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorBack.getIcon(), this.is.getIconIndex(), CableBusTextures.PartMonitorSidesStatus.getIcon(),
|
||||
CableBusTextures.PartMonitorSidesStatus.getIcon() );
|
||||
|
||||
rh.setBounds( 6, 6, 13, 10, 10, 14 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
||||
renderLights( x, y, z, rh, renderer );
|
||||
this.renderLights( x, y, z, rh, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBreakingTexture()
|
||||
{
|
||||
return is.getIconIndex();
|
||||
return this.is.getIconIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -224,7 +224,7 @@ public class PartToggleBus extends PartBasicState
|
||||
{
|
||||
GL11.glTranslated( -0.2, -0.3, 0.0 );
|
||||
|
||||
rh.setTexture( is.getIconIndex() );
|
||||
rh.setTexture( this.is.getIconIndex() );
|
||||
rh.setBounds( 6, 6, 14 - 4, 10, 10, 16 - 4 );
|
||||
rh.renderInventoryBox( renderer );
|
||||
|
||||
@@ -252,13 +252,13 @@ public class PartToggleBus extends PartBasicState
|
||||
@Override
|
||||
public void securityBreak()
|
||||
{
|
||||
if ( is.stackSize > 0 )
|
||||
if ( this.is.stackSize > 0 )
|
||||
{
|
||||
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
items.add( is.copy() );
|
||||
host.removePart( side, false );
|
||||
Platform.spawnDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, items );
|
||||
is.stackSize = 0;
|
||||
items.add( this.is.copy() );
|
||||
this.host.removePart( this.side, false );
|
||||
Platform.spawnDrops( this.tile.getWorldObj(), this.tile.xCoord, this.tile.yCoord, this.tile.zCoord, items );
|
||||
this.is.stackSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user