Began work on Multiblock battery

This commit is contained in:
Aidan Brady 2013-08-04 00:11:06 -04:00
parent 3539173e6b
commit eb77e593d6
6 changed files with 25 additions and 27 deletions

View file

@ -0,0 +1,6 @@
package resonantinduction.battery;
public class BatteryCache
{
}

View file

@ -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<TileEntityBattery> connectedBlocks = new HashSet<TileEntityBattery>();
public void update()
{
}
}

View file

@ -0,0 +1,6 @@
package resonantinduction.battery;
public class BatteryUpdateProtocol
{
}

View file

@ -0,0 +1,12 @@
package resonantinduction.battery;
public class SynchronizedBatteryData
{
public int length;
public int width;
public int height;
public int volume;
}

View file

@ -19,9 +19,6 @@ public class TileEntityBattery extends TileEntityBase implements IInventory
private ItemStack[] inventory = new ItemStack[4 * 4]; private ItemStack[] inventory = new ItemStack[4 * 4];
private byte[] sideStatus = new byte[] { 0, 0, 0, 0, 0, 0 }; private byte[] sideStatus = new byte[] { 0, 0, 0, 0, 0, 0 };
// TODO: Multiblock power storage.
private BatteryController controller;
@Override @Override
public void updateEntity() public void updateEntity()
{ {

View file

@ -351,7 +351,7 @@ public class TileEntityEMContractor extends TileEntityBase implements IPacketRec
public boolean canFunction() public boolean canFunction()
{ {
return isLatched() && worldObj.getBlockPowerInput(xCoord, yCoord, zCoord) > 0; return isLatched() && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
} }
@Override @Override