This commit is contained in:
Adrian 2015-08-11 15:52:08 +02:00
parent 6a8bbb148f
commit d7d7585c70
2 changed files with 12 additions and 13 deletions

View file

@ -93,7 +93,7 @@ public class TileFiller extends TileAbstractBuilder implements IHasWork, IContro
}
private void initTemplate() {
if (currentPattern != null && box.isInitialized()) {
if (currentPattern != null && box.isInitialized() && box.sizeX() > 0 && box.sizeY() > 0 && box.sizeZ() > 0) {
currentTemplate = currentPattern.getTemplateBuilder(box, getWorldObj(), patternParameters);
currentTemplate.blueprint.excavate = excavate;
}

View file

@ -517,6 +517,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
if (BuildCraftBuilders.quarryLoadsChunks && chunkTicket == null) {
chunkTicket = ForgeChunkManager.requestTicket(BuildCraftBuilders.instance, worldObj, Type.NORMAL);
}
if (chunkTicket != null) {
chunkTicket.getModData().setInteger("quarryX", xCoord);
chunkTicket.getModData().setInteger("quarryY", yCoord);
@ -539,19 +540,17 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
int xSize = a.xMax() - a.xMin() + 1;
int zSize = a.zMax() - a.zMin() + 1;
if (chunkTicket != null) {
if (xSize < 3 || zSize < 3 || ((xSize * zSize) >> 8) >= chunkTicket.getMaxChunkListDepth()) {
if (placedBy != null) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"Quarry size is outside of chunkloading bounds or too small %d %d (%d)",
xSize, zSize,
chunkTicket.getMaxChunkListDepth())));
}
a = new DefaultAreaProvider(xCoord, yCoord, zCoord, xCoord + 10, yCoord + 4, zCoord + 10);
useDefault = true;
if (xSize < 3 || zSize < 3 || (chunkTicket != null && ((xSize * zSize) >> 8) >= chunkTicket.getMaxChunkListDepth())) {
if (placedBy != null) {
placedBy.addChatMessage(new ChatComponentText(
String.format(
"Quarry size is outside of chunkloading bounds or too small %d %d (%d)",
xSize, zSize,
chunkTicket != null ? chunkTicket.getMaxChunkListDepth() : 0)));
}
a = new DefaultAreaProvider(xCoord, yCoord, zCoord, xCoord + 10, yCoord + 4, zCoord + 10);
useDefault = true;
}
xSize = a.xMax() - a.xMin() + 1;