Hopefully fixed BuildCraft powerHandler bug
This commit is contained in:
parent
e150df8743
commit
f3838a1f7e
2 changed files with 2 additions and 2 deletions
|
@ -97,8 +97,6 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, II
|
||||||
|
|
||||||
((ISustainedInventory)tileEntity).setInventory(getInventory(stack));
|
((ISustainedInventory)tileEntity).setInventory(getInventory(stack));
|
||||||
|
|
||||||
tileEntity.powerHandler.configure(0, 100, 0, (int)(tileEntity.tier.MAX_ELECTRICITY*Mekanism.TO_BC));
|
|
||||||
|
|
||||||
if(!world.isRemote)
|
if(!world.isRemote)
|
||||||
{
|
{
|
||||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||||
|
|
|
@ -143,6 +143,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||||
super.readFromNBT(nbtTags);
|
super.readFromNBT(nbtTags);
|
||||||
|
|
||||||
electricityStored = nbtTags.getDouble("electricityStored");
|
electricityStored = nbtTags.getDouble("electricityStored");
|
||||||
|
powerHandler.readFromNBT(nbtTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -151,6 +152,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
||||||
super.writeToNBT(nbtTags);
|
super.writeToNBT(nbtTags);
|
||||||
|
|
||||||
nbtTags.setDouble("electricityStored", getEnergy());
|
nbtTags.setDouble("electricityStored", getEnergy());
|
||||||
|
powerHandler.writeToNBT(nbtTags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue