Fix quarry ghost chunkloading when only the edges of a quarry are loaded.
This commit is contained in:
parent
57418971af
commit
f4a4efce06
1 changed files with 10 additions and 8 deletions
|
@ -152,16 +152,18 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean areChunksLoaded() {
|
public boolean areChunksLoaded() {
|
||||||
if (BuildCraftBuilders.quarryLoadsChunks) {
|
if (!BuildCraftBuilders.quarryLoadsChunks) {
|
||||||
// Small optimization
|
// Each chunk covers the full height, so we only check one of them per height.
|
||||||
return true;
|
for (int chunkX = box.xMin >> 4; chunkX <= box.xMax >> 4; chunkX++) {
|
||||||
|
for (int chunkZ = box.zMin >> 4; chunkZ <= box.zMax >> 4; chunkZ++) {
|
||||||
|
if (!worldObj.blockExists(chunkX << 4, box.yMax, chunkZ << 4)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Each chunk covers the full height, so we only check one of them per height.
|
return true;
|
||||||
return worldObj.blockExists(box.xMin, box.yMax, box.zMin)
|
|
||||||
&& worldObj.blockExists(box.xMax, box.yMax, box.zMin)
|
|
||||||
&& worldObj.blockExists(box.xMin, box.yMax, box.zMax)
|
|
||||||
&& worldObj.blockExists(box.xMax, box.yMax, box.zMax);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue