Fix AirGenerator destroying multiblocks

May not work, cannot test
This commit is contained in:
Francescco Macagno 2016-04-21 13:38:44 -07:00
parent 4666e03d45
commit 0fe27726f1

View file

@ -60,7 +60,7 @@ public class TileEntityAirGenerator extends TileEntityAbstractEnergy {
private void releaseAir(int xOffset, int yOffset, int zOffset) {
Block block = worldObj.getBlock(xCoord + xOffset, yCoord + yOffset, zCoord + zOffset);
if (block.isAir(worldObj, xOffset, yOffset, zOffset)) {// can be air
if (block == Block.AIR) {// can be air
int energy_cost = (!block.isAssociatedBlock(WarpDrive.blockAir)) ? WarpDriveConfig.AIRGEN_ENERGY_PER_NEWAIRBLOCK : WarpDriveConfig.AIRGEN_ENERGY_PER_EXISTINGAIRBLOCK;
if (consumeEnergy(energy_cost, true)) {// enough energy
if (worldObj.setBlock(xCoord + xOffset, yCoord + yOffset, zCoord + zOffset, WarpDrive.blockAir, START_CONCENTRATION_VALUE, 2)) {