Fix block updating.

This commit is contained in:
Raoul Van den Berge
2016-03-19 14:59:02 +01:00
parent ac1b607fa7
commit caec84191a
6 changed files with 6 additions and 6 deletions

View File

@@ -98,7 +98,8 @@ public abstract class BlockBase extends Block
((TileBase) tile).setDirection(EnumFacing.getFront(newDir));
// @TODO: world.markBlockForUpdate(pos);
world.notifyBlockUpdate(pos, world.getBlockState(pos), world.getBlockState(pos), 2 | 4);
return true;
}

View File

@@ -432,7 +432,7 @@ public class TileController extends TileBase implements IEnergyReceiver, INetwor
if (lastEnergy != energy.getEnergyStored())
{
// @TODO: worldObj.markBlockForUpdate(pos);
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 2 | 4);
}
energyUsage = buf.readInt();

View File

@@ -204,7 +204,7 @@ public class TileDetector extends TileMachine implements ICompareSetting
if (powered != lastPowered)
{
// @TODO: worldObj.markBlockForUpdate(pos);
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 2 | 4);
}
}

View File

@@ -125,7 +125,6 @@ public class TileGrid extends TileMachine
onCraftingMatrixChanged();
// @TODO: HACK!
TargetPoint target = new TargetPoint(worldObj.provider.getDimensionType().getId(), pos.getX(), pos.getY(), pos.getZ(), UPDATE_RANGE);
StorageCraft.NETWORK.sendToAllAround(new MessageGridCraftingUpdate(this), target);

View File

@@ -116,7 +116,7 @@ public abstract class TileMachine extends TileBase implements INetworkTile, IRed
if (lastConnected != connected)
{
// @TODO: worldObj.markBlockForUpdate(pos);
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 2 | 4);
}
}

View File

@@ -154,7 +154,7 @@ public class TileWirelessTransmitter extends TileMachine implements IInventory
if (lastWorking != working)
{
// @TODO: worldObj.markBlockForUpdate(pos);
worldObj.notifyBlockUpdate(pos, worldObj.getBlockState(pos), worldObj.getBlockState(pos), 2 | 4);
}
}