Merge in Builder support.

This commit is contained in:
AlgorithmX2
2014-05-11 13:48:14 -05:00
31 changed files with 393 additions and 50 deletions
+26 -2
View File
@@ -79,6 +79,23 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
return sides[side.ordinal()];
}
public void rotateLeft()
{
IPart newSides[] = new IPart[6];
newSides[ForgeDirection.UP.ordinal()] = sides[ForgeDirection.UP.ordinal()];
newSides[ForgeDirection.DOWN.ordinal()] = sides[ForgeDirection.DOWN.ordinal()];
newSides[ForgeDirection.EAST.ordinal()] = sides[ForgeDirection.NORTH.ordinal()];
newSides[ForgeDirection.SOUTH.ordinal()] = sides[ForgeDirection.EAST.ordinal()];
newSides[ForgeDirection.WEST.ordinal()] = sides[ForgeDirection.SOUTH.ordinal()];
newSides[ForgeDirection.NORTH.ordinal()] = sides[ForgeDirection.WEST.ordinal()];
sides = newSides;
fc.rotateLeft();
}
public void updateDynamicRender()
{
requiresDynamicRender = false;
@@ -575,6 +592,8 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
{
byte sides = data.readByte();
boolean updateBlock = false;
for (int x = 0; x < 7; x++)
{
ForgeDirection side = ForgeDirection.getOrientation( x );
@@ -589,7 +608,10 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
ItemStack current = p != null ? p.getItemStack( PartItemStack.Network ) : null;
if ( current != null && current.getItem() == myItem && current.getItemDamage() == dmgValue )
p.readFromStream( data );
{
if ( p.readFromStream( data ) )
updateBlock = true;
}
else
{
removePart( side, false );
@@ -607,7 +629,9 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
removePart( side, false );
}
return fc.readFromStream( data );
if ( fc.readFromStream( data ) )
return true;
return updateBlock;
}
ForgeDirection getSide(IPart part)
+1 -1
View File
@@ -284,7 +284,7 @@ public class PartCable extends AEBasePart implements IPartCable
int cs = data.readByte();
int sideOut = data.readInt();
EnumSet<ForgeDirection> myC = connections;
EnumSet<ForgeDirection> myC = connections.clone();
boolean wasPowered = powered;
powered = false;
boolean chchanged = false;