fix Quarry not chunkloading in dimensions other than overworld, fixes #2417 and maybe #2322

This commit is contained in:
Hea3veN 2015-02-20 00:45:03 -03:00
parent e79e4034f8
commit 9d61900d5f

View file

@ -115,7 +115,6 @@ public class BuildCraftFactory extends BuildCraftMod {
int quarryY = ticket.getModData().getInteger("quarryY"); int quarryY = ticket.getModData().getInteger("quarryY");
int quarryZ = ticket.getModData().getInteger("quarryZ"); int quarryZ = ticket.getModData().getInteger("quarryZ");
if (world.blockExists(quarryX, quarryY, quarryZ)) {
Block block = world.getBlock(quarryX, quarryY, quarryZ); Block block = world.getBlock(quarryX, quarryY, quarryZ);
if (block == quarryBlock) { if (block == quarryBlock) {
TileQuarry tq = (TileQuarry) world.getTileEntity(quarryX, quarryY, quarryZ); TileQuarry tq = (TileQuarry) world.getTileEntity(quarryX, quarryY, quarryZ);
@ -123,7 +122,6 @@ public class BuildCraftFactory extends BuildCraftMod {
} }
} }
} }
}
@Override @Override
public List<Ticket> ticketsLoaded(List<Ticket> tickets, World world, int maxTicketCount) { public List<Ticket> ticketsLoaded(List<Ticket> tickets, World world, int maxTicketCount) {
@ -133,13 +131,11 @@ public class BuildCraftFactory extends BuildCraftMod {
int quarryY = ticket.getModData().getInteger("quarryY"); int quarryY = ticket.getModData().getInteger("quarryY");
int quarryZ = ticket.getModData().getInteger("quarryZ"); int quarryZ = ticket.getModData().getInteger("quarryZ");
if (world.blockExists(quarryX, quarryY, quarryZ)) {
Block block = world.getBlock(quarryX, quarryY, quarryZ); Block block = world.getBlock(quarryX, quarryY, quarryZ);
if (block == quarryBlock) { if (block == quarryBlock) {
validTickets.add(ticket); validTickets.add(ticket);
} }
} }
}
return validTickets; return validTickets;
} }
} }