Began work on Multiblock battery
This commit is contained in:
parent
3539173e6b
commit
eb77e593d6
6 changed files with 25 additions and 27 deletions
6
src/resonantinduction/battery/BatteryCache.java
Normal file
6
src/resonantinduction/battery/BatteryCache.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
package resonantinduction.battery;
|
||||
|
||||
public class BatteryCache
|
||||
{
|
||||
|
||||
}
|
|
@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
6
src/resonantinduction/battery/BatteryUpdateProtocol.java
Normal file
6
src/resonantinduction/battery/BatteryUpdateProtocol.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
package resonantinduction.battery;
|
||||
|
||||
public class BatteryUpdateProtocol
|
||||
{
|
||||
|
||||
}
|
12
src/resonantinduction/battery/SynchronizedBatteryData.java
Normal file
12
src/resonantinduction/battery/SynchronizedBatteryData.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package resonantinduction.battery;
|
||||
|
||||
public class SynchronizedBatteryData
|
||||
{
|
||||
public int length;
|
||||
|
||||
public int width;
|
||||
|
||||
public int height;
|
||||
|
||||
public int volume;
|
||||
}
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue