From eb77e593d623a5915c7a6b7d32e110787dfa78c0 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Sun, 4 Aug 2013 00:11:06 -0400 Subject: [PATCH] Began work on Multiblock battery --- .../battery/BatteryCache.java | 6 +++++ .../battery/BatteryController.java | 23 ------------------- .../battery/BatteryUpdateProtocol.java | 6 +++++ .../battery/SynchronizedBatteryData.java | 12 ++++++++++ .../battery/TileEntityBattery.java | 3 --- .../contractor/TileEntityEMContractor.java | 2 +- 6 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 src/resonantinduction/battery/BatteryCache.java delete mode 100644 src/resonantinduction/battery/BatteryController.java create mode 100644 src/resonantinduction/battery/BatteryUpdateProtocol.java create mode 100644 src/resonantinduction/battery/SynchronizedBatteryData.java diff --git a/src/resonantinduction/battery/BatteryCache.java b/src/resonantinduction/battery/BatteryCache.java new file mode 100644 index 000000000..75f219639 --- /dev/null +++ b/src/resonantinduction/battery/BatteryCache.java @@ -0,0 +1,6 @@ +package resonantinduction.battery; + +public class BatteryCache +{ + +} diff --git a/src/resonantinduction/battery/BatteryController.java b/src/resonantinduction/battery/BatteryController.java deleted file mode 100644 index 4eebb9e3a..000000000 --- a/src/resonantinduction/battery/BatteryController.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * - */ -package resonantinduction.battery; - -import java.util.HashSet; -import java.util.Set; - -/** - * Multiblock battery controller - * - * @author Calclavia - * - */ -public class BatteryController -{ - public Set connectedBlocks = new HashSet(); - - public void update() - { - - } -} diff --git a/src/resonantinduction/battery/BatteryUpdateProtocol.java b/src/resonantinduction/battery/BatteryUpdateProtocol.java new file mode 100644 index 000000000..43bc2bb7f --- /dev/null +++ b/src/resonantinduction/battery/BatteryUpdateProtocol.java @@ -0,0 +1,6 @@ +package resonantinduction.battery; + +public class BatteryUpdateProtocol +{ + +} diff --git a/src/resonantinduction/battery/SynchronizedBatteryData.java b/src/resonantinduction/battery/SynchronizedBatteryData.java new file mode 100644 index 000000000..fd1f05db2 --- /dev/null +++ b/src/resonantinduction/battery/SynchronizedBatteryData.java @@ -0,0 +1,12 @@ +package resonantinduction.battery; + +public class SynchronizedBatteryData +{ + public int length; + + public int width; + + public int height; + + public int volume; +} diff --git a/src/resonantinduction/battery/TileEntityBattery.java b/src/resonantinduction/battery/TileEntityBattery.java index ef14f8740..3fb68b058 100644 --- a/src/resonantinduction/battery/TileEntityBattery.java +++ b/src/resonantinduction/battery/TileEntityBattery.java @@ -19,9 +19,6 @@ public class TileEntityBattery extends TileEntityBase implements IInventory private ItemStack[] inventory = new ItemStack[4 * 4]; private byte[] sideStatus = new byte[] { 0, 0, 0, 0, 0, 0 }; - // TODO: Multiblock power storage. - private BatteryController controller; - @Override public void updateEntity() { diff --git a/src/resonantinduction/contractor/TileEntityEMContractor.java b/src/resonantinduction/contractor/TileEntityEMContractor.java index d0ddb522d..eb253081a 100644 --- a/src/resonantinduction/contractor/TileEntityEMContractor.java +++ b/src/resonantinduction/contractor/TileEntityEMContractor.java @@ -351,7 +351,7 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec public boolean canFunction() { - return isLatched() && worldObj.getBlockPowerInput(xCoord, yCoord, zCoord) > 0; + return isLatched() && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); } @Override