make quarry update packets cover the whole quarry visibility area, and even a bit more
This commit is contained in:
parent
3d2cb3e207
commit
5a7cfc4fce
|
@ -50,6 +50,7 @@ import buildcraft.core.Box;
|
|||
import buildcraft.core.Box.Kind;
|
||||
import buildcraft.core.CoreConstants;
|
||||
import buildcraft.core.DefaultAreaProvider;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.blueprints.Blueprint;
|
||||
import buildcraft.core.blueprints.BptBuilderBase;
|
||||
import buildcraft.core.blueprints.BptBuilderBlueprint;
|
||||
|
@ -478,6 +479,11 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
|||
&& !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getNetworkUpdateRange() {
|
||||
return DefaultProps.NETWORK_UPDATE_RANGE + (int) Math.ceil(Math.sqrt(yCoord * yCoord + box.sizeX() * box.sizeX() + box.sizeZ() * box.sizeZ()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
if (chunkTicket != null) {
|
||||
|
|
|
@ -108,10 +108,14 @@ public abstract class TileBuildCraft extends TileEntity implements IEnergyHandle
|
|||
public void sendNetworkUpdate() {
|
||||
if (worldObj != null && !worldObj.isRemote) {
|
||||
BuildCraftCore.instance.sendToPlayers(getPacketUpdate(), worldObj,
|
||||
xCoord, yCoord, zCoord, DefaultProps.NETWORK_UPDATE_RANGE);
|
||||
xCoord, yCoord, zCoord, getNetworkUpdateRange());
|
||||
}
|
||||
}
|
||||
|
||||
protected int getNetworkUpdateRange() {
|
||||
return DefaultProps.NETWORK_UPDATE_RANGE;
|
||||
}
|
||||
|
||||
public void writeData(ByteBuf stream) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue