@@ -36,7 +36,7 @@ import appeng.util.Platform;
|
||||
public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IPowerChannelState
|
||||
{
|
||||
|
||||
CraftingCPUCluster clust;
|
||||
CraftingCPUCluster cluster;
|
||||
final CraftingCPUCalculator calc = new CraftingCPUCalculator( this );
|
||||
|
||||
public ISimplifiedBundle lightCache;
|
||||
@@ -62,10 +62,10 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
|
||||
public void updateStatus(CraftingCPUCluster c)
|
||||
{
|
||||
if ( clust != null && clust != c )
|
||||
clust.breakCluster();
|
||||
if ( cluster != null && cluster != c )
|
||||
cluster.breakCluster();
|
||||
|
||||
clust = c;
|
||||
cluster = c;
|
||||
updateMeta( true );
|
||||
}
|
||||
|
||||
@@ -77,16 +77,16 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
public void setName(String name)
|
||||
{
|
||||
super.setName( name );
|
||||
if ( clust != null )
|
||||
clust.updateName();
|
||||
if ( cluster != null )
|
||||
cluster.updateName();
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public void writeToNBT_TileCraftingTile(NBTTagCompound data)
|
||||
{
|
||||
data.setBoolean( "core", isCoreBlock );
|
||||
if ( isCoreBlock && clust != null )
|
||||
clust.writeToNBT( data );
|
||||
if ( isCoreBlock && cluster != null )
|
||||
cluster.writeToNBT( data );
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
@@ -95,8 +95,8 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
isCoreBlock = data.getBoolean( "core" );
|
||||
if ( isCoreBlock )
|
||||
{
|
||||
if ( clust != null )
|
||||
clust.readFromNBT( data );
|
||||
if ( cluster != null )
|
||||
cluster.readFromNBT( data );
|
||||
else
|
||||
previousState = (NBTTagCompound) data.copy();
|
||||
}
|
||||
@@ -125,9 +125,9 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
@Override
|
||||
public void disconnect(boolean update)
|
||||
{
|
||||
if ( clust != null )
|
||||
if ( cluster != null )
|
||||
{
|
||||
clust.destroy();
|
||||
cluster.destroy();
|
||||
if ( update )
|
||||
updateMeta( true );
|
||||
}
|
||||
@@ -157,10 +157,10 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
power = gridProxy.isActive();
|
||||
|
||||
int current = worldObj.getBlockMetadata( xCoord, yCoord, zCoord );
|
||||
int newmeta = (current & 3) | (formed ? 8 : 0) | (power ? 4 : 0);
|
||||
int newMeta = (current & 3) | (formed ? 8 : 0) | (power ? 4 : 0);
|
||||
|
||||
if ( current != newmeta )
|
||||
worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, newmeta, 2 );
|
||||
if ( current != newMeta )
|
||||
worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, newMeta, 2 );
|
||||
|
||||
if ( updateFormed )
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
@Override
|
||||
public IAECluster getCluster()
|
||||
{
|
||||
return clust;
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -195,7 +195,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
{
|
||||
if ( Platform.isClient() )
|
||||
return (worldObj.getBlockMetadata( xCoord, yCoord, zCoord ) & 8) == 8;
|
||||
return clust != null;
|
||||
return cluster != null;
|
||||
}
|
||||
|
||||
public boolean isAccelerator()
|
||||
@@ -230,14 +230,14 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
|
||||
public void breakCluster()
|
||||
{
|
||||
if ( clust != null )
|
||||
if ( cluster != null )
|
||||
{
|
||||
clust.cancel();
|
||||
IMEInventory<IAEItemStack> inv = clust.getInventory();
|
||||
cluster.cancel();
|
||||
IMEInventory<IAEItemStack> inv = cluster.getInventory();
|
||||
|
||||
LinkedList<WorldCoord> places = new LinkedList<WorldCoord>();
|
||||
|
||||
Iterator<IGridHost> i = clust.getTiles();
|
||||
Iterator<IGridHost> i = cluster.getTiles();
|
||||
while (i.hasNext())
|
||||
{
|
||||
IGridHost h = i.next();
|
||||
@@ -269,7 +269,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
ais.setStackSize( ais.getItemStack().getMaxStackSize() );
|
||||
while (true)
|
||||
{
|
||||
IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, clust.getActionSource() );
|
||||
IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, cluster.getActionSource() );
|
||||
if ( g == null )
|
||||
break;
|
||||
|
||||
@@ -281,7 +281,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
|
||||
}
|
||||
|
||||
clust.destroy();
|
||||
cluster.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,9 +197,9 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
|
||||
ItemStack pattern = myPlan.getPattern();
|
||||
if ( pattern != null )
|
||||
{
|
||||
NBTTagCompound pdata = new NBTTagCompound();
|
||||
pattern.writeToNBT( pdata );
|
||||
data.setTag( "myPlan", pdata );
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
pattern.writeToNBT( compound );
|
||||
data.setTag( "myPlan", compound );
|
||||
data.setInteger( "pushDirection", pushDirection.ordinal() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class AppEngInternalAEInventory implements IInventory, Iterable<ItemStack
|
||||
|
||||
if ( te != null && Platform.isServer() )
|
||||
{
|
||||
te.onChangeInventory( this, slot, InvOperation.decrStackSize, ns, null );
|
||||
te.onChangeInventory( this, slot, InvOperation.decreaseStackSize, ns, null );
|
||||
}
|
||||
|
||||
return ns;
|
||||
@@ -240,7 +240,7 @@ public class AppEngInternalAEInventory implements IInventory, Iterable<ItemStack
|
||||
return new InvIterator( this );
|
||||
}
|
||||
|
||||
public Iterator<IAEItemStack> aeiterator()
|
||||
public Iterator<IAEItemStack> getNewAEIterator()
|
||||
{
|
||||
return new AEInvIterator( this );
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
|
||||
public boolean enableClientEvents = false;
|
||||
protected ItemStack inv[];
|
||||
|
||||
public IMEInventory getIMEI()
|
||||
public IMEInventory getMEInventory()
|
||||
{
|
||||
return new MEIInventoryWrapper( this, null );
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
|
||||
|
||||
if ( te != null && eventsEnabled() )
|
||||
{
|
||||
te.onChangeInventory( this, slot, InvOperation.decrStackSize, ns, null );
|
||||
te.onChangeInventory( this, slot, InvOperation.decreaseStackSize, ns, null );
|
||||
}
|
||||
|
||||
markDirty();
|
||||
|
||||
@@ -2,6 +2,6 @@ package appeng.tile.inventory;
|
||||
|
||||
public enum InvOperation
|
||||
{
|
||||
decrStackSize, setInventorySlotContents, markDirty
|
||||
decreaseStackSize, setInventorySlotContents, markDirty
|
||||
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
{
|
||||
if ( cacheUpgrades == null )
|
||||
{
|
||||
ICellWorkbenchItem cwbi = getCell();
|
||||
if ( cwbi == null )
|
||||
ICellWorkbenchItem cell = getCell();
|
||||
if ( cell == null )
|
||||
return null;
|
||||
|
||||
ItemStack is = cell.getStackInSlot( 0 );
|
||||
ItemStack is = this.cell.getStackInSlot( 0 );
|
||||
if ( is == null )
|
||||
return null;
|
||||
|
||||
IInventory inv = cwbi.getUpgradesInventory( is );
|
||||
IInventory inv = cell.getUpgradesInventory( is );
|
||||
if ( inv == null )
|
||||
return null;
|
||||
|
||||
@@ -58,15 +58,15 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
{
|
||||
if ( cacheConfig == null )
|
||||
{
|
||||
ICellWorkbenchItem cwbi = getCell();
|
||||
if ( cwbi == null )
|
||||
ICellWorkbenchItem cell = getCell();
|
||||
if ( cell == null )
|
||||
return null;
|
||||
|
||||
ItemStack is = cell.getStackInSlot( 0 );
|
||||
ItemStack is = this.cell.getStackInSlot( 0 );
|
||||
if ( is == null )
|
||||
return null;
|
||||
|
||||
IInventory inv = cwbi.getConfigInventory( is );
|
||||
IInventory inv = cell.getConfigInventory( is );
|
||||
if ( inv == null )
|
||||
return null;
|
||||
|
||||
|
||||
@@ -55,13 +55,13 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS
|
||||
@MENetworkEventSubscribe
|
||||
public void stateChange(MENetworkChannelsChanged c)
|
||||
{
|
||||
duality.notifyNeightbors();
|
||||
duality.notifyNeighbors();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void stateChange(MENetworkPowerStatusChange c)
|
||||
{
|
||||
duality.notifyNeightbors();
|
||||
duality.notifyNeighbors();
|
||||
}
|
||||
|
||||
public void setSide(ForgeDirection axis)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package appeng.tile.misc;
|
||||
|
||||
import appeng.helpers.Splotch;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
@@ -16,7 +17,6 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.helpers.Splot;
|
||||
import appeng.items.misc.ItemPaintBall;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.TileEvent;
|
||||
@@ -30,7 +30,7 @@ public class TilePaint extends AEBaseTile
|
||||
static final int LIGHT_PER_DOT = 12;
|
||||
|
||||
int isLit = 0;
|
||||
ArrayList<Splot> dots = null;
|
||||
ArrayList<Splotch> dots = null;
|
||||
|
||||
void writeBuffer(ByteBuf out)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class TilePaint extends AEBaseTile
|
||||
|
||||
out.writeByte( dots.size() );
|
||||
|
||||
for (Splot s : dots)
|
||||
for (Splotch s : dots)
|
||||
s.writeToStream( out );
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ public class TilePaint extends AEBaseTile
|
||||
|
||||
dots = new ArrayList( howMany );
|
||||
for (int x = 0; x < howMany; x++)
|
||||
dots.add( new Splot( in ) );
|
||||
dots.add( new Splotch( in ) );
|
||||
|
||||
isLit = 0;
|
||||
for (Splot s : dots)
|
||||
for (Splotch s : dots)
|
||||
{
|
||||
if ( s.lumen )
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public class TilePaint extends AEBaseTile
|
||||
private void updateData()
|
||||
{
|
||||
isLit = 0;
|
||||
for (Splot s : dots)
|
||||
for (Splotch s : dots)
|
||||
{
|
||||
if ( s.lumen )
|
||||
{
|
||||
@@ -154,10 +154,10 @@ public class TilePaint extends AEBaseTile
|
||||
|
||||
private void removeSide(ForgeDirection side)
|
||||
{
|
||||
Iterator<Splot> i = dots.iterator();
|
||||
Iterator<Splotch> i = dots.iterator();
|
||||
while (i.hasNext())
|
||||
{
|
||||
Splot s = i.next();
|
||||
Splotch s = i.next();
|
||||
if ( s.side == side )
|
||||
i.remove();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public class TilePaint extends AEBaseTile
|
||||
if ( dots.size() > 20 )
|
||||
dots.remove( 0 );
|
||||
|
||||
dots.add( new Splot( col, lit, side, hitVec ) );
|
||||
dots.add( new Splotch( col, lit, side, hitVec ) );
|
||||
if ( lit )
|
||||
isLit += LIGHT_PER_DOT;
|
||||
|
||||
@@ -206,7 +206,7 @@ public class TilePaint extends AEBaseTile
|
||||
worldObj.updateLightByType( EnumSkyBlock.Block, xCoord, yCoord, zCoord );
|
||||
}
|
||||
|
||||
public Collection<Splot> getDots()
|
||||
public Collection<Splotch> getDots()
|
||||
{
|
||||
if ( dots == null )
|
||||
return ImmutableList.of();
|
||||
|
||||
@@ -160,9 +160,9 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
}
|
||||
|
||||
burnSpeed = Math.max( 20, Math.min( burnSpeed, 200 ) );
|
||||
double dialiation = burnSpeed / 100.0;
|
||||
double dilation = burnSpeed / 100.0;
|
||||
|
||||
double timePassed = (double) TicksSinceLastCall * dialiation;
|
||||
double timePassed = (double) TicksSinceLastCall * dilation;
|
||||
burnTime -= timePassed;
|
||||
if ( burnTime < 0 )
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean visual)
|
||||
{
|
||||
return cb.getSelectedBoundingBoxsFromPool( false, true, e, visual );
|
||||
return cb.getSelectedBoundingBoxesFromPool( false, true, e, visual );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class TileEnergyAcceptor extends AENetworkPowerTile
|
||||
}
|
||||
catch (GridAccessException e)
|
||||
{
|
||||
// null net, probably bads.
|
||||
// null net, probably bad.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
if ( notLoaded() )
|
||||
return;
|
||||
|
||||
byte leel = (byte) (8.0 * (internalCurrentPower / internalMaxPower));
|
||||
byte boundMetadata = (byte) (8.0 * (internalCurrentPower / internalMaxPower));
|
||||
|
||||
if ( leel > 7 )
|
||||
leel = 7;
|
||||
if ( leel < 0 )
|
||||
leel = 0;
|
||||
if ( boundMetadata > 7 )
|
||||
boundMetadata = 7;
|
||||
if ( boundMetadata < 0 )
|
||||
boundMetadata = 0;
|
||||
|
||||
if ( currentMeta != leel )
|
||||
if ( currentMeta != boundMetadata )
|
||||
{
|
||||
currentMeta = leel;
|
||||
currentMeta = boundMetadata;
|
||||
worldObj.setBlockMetadataWithNotify( xCoord, yCoord, zCoord, currentMeta, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package appeng.tile.powersink;
|
||||
|
||||
import appeng.integration.abstraction.helpers.BaseMJPerdition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IMJ5;
|
||||
import appeng.integration.abstraction.helpers.BaseMJperdition;
|
||||
import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
import appeng.transformer.annotations.integration.Interface;
|
||||
@@ -20,7 +20,7 @@ import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||
public abstract class MinecraftJoules5 extends AERootPoweredTile implements IPowerReceptor
|
||||
{
|
||||
|
||||
BaseMJperdition bcPowerWrapper;
|
||||
BaseMJPerdition bcPowerWrapper;
|
||||
|
||||
@Method(iname = "MJ5")
|
||||
@TileEvent(TileEventType.TICK)
|
||||
@@ -40,7 +40,7 @@ public abstract class MinecraftJoules5 extends AERootPoweredTile implements IPow
|
||||
IMJ5 mjIntegration = (IMJ5) AppEng.instance.getIntegration( IntegrationType.MJ5 );
|
||||
if ( mjIntegration != null )
|
||||
{
|
||||
bcPowerWrapper = (BaseMJperdition) mjIntegration.createPerdition( this );
|
||||
bcPowerWrapper = (BaseMJPerdition) mjIntegration.createPerdition( this );
|
||||
if ( bcPowerWrapper != null )
|
||||
bcPowerWrapper.configure( 1, 380, 1.0f / 5.0f, 1000 );
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
final byte powered = 64;
|
||||
|
||||
private QuantumCalculator calc = new QuantumCalculator( this );
|
||||
byte xdex = -1;
|
||||
byte constructed = -1;
|
||||
|
||||
QuantumCluster clust;
|
||||
QuantumCluster cluster;
|
||||
public boolean bridgePowered;
|
||||
|
||||
private boolean updateStatus = false;
|
||||
@@ -56,8 +56,8 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
if ( updateStatus )
|
||||
{
|
||||
updateStatus = false;
|
||||
if ( clust != null )
|
||||
clust.updateStatus( true );
|
||||
if ( cluster != null )
|
||||
cluster.updateStatus( true );
|
||||
markForUpdate();
|
||||
}
|
||||
}
|
||||
@@ -65,12 +65,12 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||
public void writeToStream_TileQuantumBridge(ByteBuf data) throws IOException
|
||||
{
|
||||
int out = xdex;
|
||||
int out = constructed;
|
||||
|
||||
if ( getStackInSlot( 0 ) != null && xdex != -1 )
|
||||
if ( getStackInSlot( 0 ) != null && constructed != -1 )
|
||||
out = out | hasSingularity;
|
||||
|
||||
if ( gridProxy.isActive() && xdex != -1 )
|
||||
if ( gridProxy.isActive() && constructed != -1 )
|
||||
out = out | powered;
|
||||
|
||||
data.writeByte( (byte) out );
|
||||
@@ -79,10 +79,10 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
@TileEvent(TileEventType.NETWORK_READ)
|
||||
public boolean readFromStream_TileQuantumBridge(ByteBuf data) throws IOException
|
||||
{
|
||||
int oldValue = xdex;
|
||||
xdex = data.readByte();
|
||||
bridgePowered = (xdex | powered) == powered;
|
||||
return xdex != oldValue;
|
||||
int oldValue = constructed;
|
||||
constructed = data.readByte();
|
||||
bridgePowered = (constructed | powered) == powered;
|
||||
return constructed != oldValue;
|
||||
}
|
||||
|
||||
public TileQuantumBridge() {
|
||||
@@ -106,8 +106,8 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
@Override
|
||||
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added)
|
||||
{
|
||||
if ( clust != null )
|
||||
clust.updateStatus( true );
|
||||
if ( cluster != null )
|
||||
cluster.updateStatus( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,15 +121,15 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
@Override
|
||||
public void disconnect(boolean affectWorld)
|
||||
{
|
||||
if ( clust != null )
|
||||
if ( cluster != null )
|
||||
{
|
||||
if ( !affectWorld )
|
||||
clust.updateStatus = false;
|
||||
cluster.updateStatus = false;
|
||||
|
||||
clust.destroy();
|
||||
cluster.destroy();
|
||||
}
|
||||
|
||||
clust = null;
|
||||
cluster = null;
|
||||
|
||||
if ( affectWorld )
|
||||
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
@@ -138,7 +138,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
@Override
|
||||
public IAECluster getCluster()
|
||||
{
|
||||
return clust;
|
||||
return cluster;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -171,13 +171,13 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
public void updateStatus(QuantumCluster c, byte flags, boolean affectWorld)
|
||||
{
|
||||
clust = c;
|
||||
cluster = c;
|
||||
|
||||
if ( affectWorld )
|
||||
{
|
||||
if ( xdex != flags )
|
||||
if ( constructed != flags )
|
||||
{
|
||||
xdex = flags;
|
||||
constructed = flags;
|
||||
markForUpdate();
|
||||
}
|
||||
|
||||
@@ -209,13 +209,13 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
public boolean isCorner()
|
||||
{
|
||||
return (xdex & corner) == corner && xdex != -1;
|
||||
return (constructed & corner) == corner && constructed != -1;
|
||||
}
|
||||
|
||||
public boolean isPowered()
|
||||
{
|
||||
if ( Platform.isClient() )
|
||||
return (xdex & powered) == powered && xdex != -1;
|
||||
return (constructed & powered) == powered && constructed != -1;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -231,7 +231,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
public boolean isFormed()
|
||||
{
|
||||
return xdex != -1;
|
||||
return constructed != -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -267,15 +267,15 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
public boolean hasQES()
|
||||
{
|
||||
if ( xdex == -1 )
|
||||
if ( constructed == -1 )
|
||||
return false;
|
||||
return (xdex & hasSingularity) == hasSingularity;
|
||||
return (constructed & hasSingularity) == hasSingularity;
|
||||
}
|
||||
|
||||
public void breakCluster()
|
||||
{
|
||||
if ( clust != null )
|
||||
clust.destroy();
|
||||
if ( cluster != null )
|
||||
cluster.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ import appeng.tile.grid.AENetworkTile;
|
||||
public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
{
|
||||
|
||||
public final int DISPLAY_ENDMIN = 0x01;
|
||||
public final int DISPLAY_ENDMAX = 0x02;
|
||||
public final int DISPLAY_END_MIN = 0x01;
|
||||
public final int DISPLAY_END_MAX = 0x02;
|
||||
public final int DISPLAY_MIDDLE = 0x01 + 0x02;
|
||||
public final int DISPLAY_X = 0x04;
|
||||
public final int DISPLAY_Y = 0x08;
|
||||
@@ -32,11 +32,11 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
public final int MB_STATUS = 0x01 + 0x02 + 0x04 + 0x08;
|
||||
|
||||
public final int DISPLAY_ENABLED = 0x10;
|
||||
public final int DISPLAY_POWEREDENABLED = 0x20;
|
||||
public final int DISPLAY_POWERED_ENABLED = 0x20;
|
||||
public final int NET_STATUS = 0x10 + 0x20;
|
||||
|
||||
int displayBits = 0;
|
||||
SpatialPylonCluster clust;
|
||||
SpatialPylonCluster cluster;
|
||||
final SpatialPylonCalculator calc = new SpatialPylonCalculator( this );
|
||||
|
||||
boolean didHaveLight = false;
|
||||
@@ -95,7 +95,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
|
||||
public int getLightValue()
|
||||
{
|
||||
if ( (displayBits & DISPLAY_POWEREDENABLED) == DISPLAY_POWEREDENABLED )
|
||||
if ( (displayBits & DISPLAY_POWERED_ENABLED) == DISPLAY_POWERED_ENABLED )
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
@Override
|
||||
public SpatialPylonCluster getCluster()
|
||||
{
|
||||
return clust;
|
||||
return cluster;
|
||||
}
|
||||
|
||||
public void recalculateDisplay()
|
||||
@@ -145,16 +145,16 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
|
||||
displayBits = 0;
|
||||
|
||||
if ( clust != null )
|
||||
if ( cluster != null )
|
||||
{
|
||||
if ( clust.min.equals( getLocation() ) )
|
||||
displayBits = DISPLAY_ENDMIN;
|
||||
else if ( clust.max.equals( getLocation() ) )
|
||||
displayBits = DISPLAY_ENDMAX;
|
||||
if ( cluster.min.equals( getLocation() ) )
|
||||
displayBits = DISPLAY_END_MIN;
|
||||
else if ( cluster.max.equals( getLocation() ) )
|
||||
displayBits = DISPLAY_END_MAX;
|
||||
else
|
||||
displayBits = DISPLAY_MIDDLE;
|
||||
|
||||
switch (clust.currentAxis)
|
||||
switch (cluster.currentAxis)
|
||||
{
|
||||
case X:
|
||||
displayBits |= DISPLAY_X;
|
||||
@@ -173,9 +173,9 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
try
|
||||
{
|
||||
if ( gridProxy.getEnergy().isNetworkPowered() )
|
||||
displayBits |= DISPLAY_POWEREDENABLED;
|
||||
displayBits |= DISPLAY_POWERED_ENABLED;
|
||||
|
||||
if ( clust.isValid && gridProxy.isActive() )
|
||||
if ( cluster.isValid && gridProxy.isActive() )
|
||||
displayBits |= DISPLAY_ENABLED;
|
||||
}
|
||||
catch (GridAccessException e)
|
||||
@@ -191,7 +191,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
|
||||
public void updateStatus(SpatialPylonCluster c)
|
||||
{
|
||||
clust = c;
|
||||
cluster = c;
|
||||
gridProxy.setValidSides( c == null ? EnumSet.noneOf( ForgeDirection.class ) : EnumSet.allOf( ForgeDirection.class ) );
|
||||
recalculateDisplay();
|
||||
}
|
||||
@@ -199,9 +199,9 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
@Override
|
||||
public void disconnect(boolean b)
|
||||
{
|
||||
if ( clust != null )
|
||||
if ( cluster != null )
|
||||
{
|
||||
clust.destroy();
|
||||
cluster.destroy();
|
||||
updateStatus( null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
|
||||
static final int sides[] = new int[] { 0 };
|
||||
static final int front[] = new int[] { 1 };
|
||||
static final int noslots[] = new int[] {};
|
||||
static final int noSlots[] = new int[] {};
|
||||
|
||||
AppEngInternalInventory inv = new AppEngInternalInventory( this, 2 );
|
||||
BaseActionSource mySrc = new MachineSource( this );
|
||||
@@ -264,19 +264,19 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
boolean isCached = false;
|
||||
|
||||
private ICellHandler cellHandler;
|
||||
private MEMonitorHandler icell;
|
||||
private MEMonitorHandler fcell;
|
||||
private MEMonitorHandler itemCell;
|
||||
private MEMonitorHandler fluidCell;
|
||||
|
||||
@Override
|
||||
public IMEMonitor getItemInventory()
|
||||
{
|
||||
return icell;
|
||||
return itemCell;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEMonitor getFluidInventory()
|
||||
{
|
||||
return fcell;
|
||||
return fluidCell;
|
||||
}
|
||||
|
||||
class ChestNetNotifier<T extends IAEStack<T>> implements IMEMonitorHandlerReceiver<T>
|
||||
@@ -312,9 +312,9 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
public boolean isValid(Object verificationToken)
|
||||
{
|
||||
if ( chan == StorageChannel.ITEMS )
|
||||
return verificationToken == icell;
|
||||
return verificationToken == itemCell;
|
||||
if ( chan == StorageChannel.FLUIDS )
|
||||
return verificationToken == fcell;
|
||||
return verificationToken == fluidCell;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -409,8 +409,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
{
|
||||
if ( !isCached )
|
||||
{
|
||||
icell = null;
|
||||
fcell = null;
|
||||
itemCell = null;
|
||||
fluidCell = null;
|
||||
|
||||
ItemStack is = inv.getStackInSlot( 1 );
|
||||
if ( is != null )
|
||||
@@ -431,8 +431,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
|
||||
gridProxy.setIdlePowerUsage( power );
|
||||
|
||||
icell = wrap( itemCell );
|
||||
fcell = wrap( fluidCell );
|
||||
this.itemCell = wrap( itemCell );
|
||||
this.fluidCell = wrap( fluidCell );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -440,13 +440,13 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
switch (channel)
|
||||
{
|
||||
case FLUIDS:
|
||||
if ( fcell == null )
|
||||
if ( fluidCell == null )
|
||||
throw noHandler;
|
||||
return fcell;
|
||||
return fluidCell;
|
||||
case ITEMS:
|
||||
if ( icell == null )
|
||||
if ( itemCell == null )
|
||||
throw noHandler;
|
||||
return icell;
|
||||
return itemCell;
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -464,8 +464,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
{
|
||||
if ( slot == 1 )
|
||||
{
|
||||
icell = null;
|
||||
fcell = null;
|
||||
itemCell = null;
|
||||
fluidCell = null;
|
||||
isCached = false; // recalculate the storage cell.
|
||||
|
||||
try
|
||||
@@ -566,7 +566,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
// nope!
|
||||
}
|
||||
}
|
||||
return noslots;
|
||||
return noSlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -794,8 +794,8 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
{
|
||||
priority = newValue;
|
||||
|
||||
icell = null;
|
||||
fcell = null;
|
||||
itemCell = null;
|
||||
fluidCell = null;
|
||||
isCached = false; // recalculate the storage cell.
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user