return var3;
}
@Override
public void scheduleBlockUpdateWithPriority(int x, int y, int z, int blockID, int timeOffset, int par6) {
NextTickListEntry nextTickListEntry = new NextTickListEntry(x, y, z, blockID);
//boolean isForced = getPersistentChunks().containsKey(new ChunkCoordIntPair(nextTickListEntry.xCoord >> 4, nextTickListEntry.zCoord >> 4));
//byte range = isForced ? (byte) 0 : 8;
// Removed in Forge for now.
// byte range = 0;
if (blockID > 0 && timeOffset <= 20 && worldGenInProgress.get() == Boolean.TRUE && inImmediateBlockUpdate.get() == Boolean.FALSE) {
if (Block.blocksList[blockID].func_82506_l()) {
// Not needed currently due to forge change removal.
// if (this.checkChunksExist(x - range, y - range, z - range, x + range, y + range, z + range)) {
if (this.chunkExists(x >> 4, z >> 4)) {
int realBlockID = this.getBlockIdWithoutLoad(nextTickListEntry.xCoord, nextTickListEntry.yCoord, nextTickListEntry.zCoord);
if (realBlockID > 0 && realBlockID == nextTickListEntry.blockID) {
inImmediateBlockUpdate.set(true);
try {
Block.blocksList[realBlockID].updateTick(this, nextTickListEntry.xCoord, nextTickListEntry.yCoord, nextTickListEntry.zCoord, this.rand);
} finally {
inImmediateBlockUpdate.set(false);
}
}
}
return;
}
timeOffset = 1;
}
// if (this.checkChunksExist(x - range, y - range, z - range, x + range, y + range, z + range)) {
if (this.chunkExists(x >> 4, z >> 4)) {
if (blockID > 0) {
nextTickListEntry.setScheduledTime((long) timeOffset + worldInfo.getWorldTotalTime());
nextTickListEntry.setPriority(par6);
}
pendingTickListEntries.add(nextTickListEntry);
}
}