Fix forge regen

This commit is contained in:
Jesse Boyd 2016-11-29 19:15:45 +11:00
parent 9b7b30ac1b
commit 90ba392692
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
5 changed files with 3 additions and 22 deletions

View File

@ -122,7 +122,6 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
case 62:
case 50:
case 10:
getParent().getRelighter().addLightUpdate((getX() << 4) + x, y, (getZ() << 4) + z);
default:
vs2[j] = (char) ((id << 4) + data);
vs[j] = (byte) id;

View File

@ -180,8 +180,8 @@ public enum BBC {
WORLDEDIT_CANCEL_REASON_MAX_TILES("Too many blockstates", "Cancel"),
WORLDEDIT_CANCEL_REASON_MAX_ENTITIES("Too many entities", "Cancel"),
WORLDEDIT_CANCEL_REASON_MAX_ITERATIONS("Max iterations", "Cancel"),
WORLDEDIT_CANCEL_REASON_MAX_FAILS("Outside allowed region (bypass with /wea)", "Cancel"),
WORLDEDIT_CANCEL_REASON_NO_REGION("No allowed region (bypass with /wea)", "Cancel"),
WORLDEDIT_CANCEL_REASON_MAX_FAILS("Outside allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", "Cancel"),
WORLDEDIT_CANCEL_REASON_NO_REGION("No allowed region (bypass with /wea, or disable `region-restrictions` in config.yml)", "Cancel"),
WORLDEDIT_FAILED_LOAD_CHUNK("&cSkipped loading chunk: &7%s0;%s1&c. Try increasing chunk-wait.", "Cancel"),
LOADING_CLIPBOARD("Loading clipboard from disk, please wait.", "History"),

View File

@ -219,7 +219,6 @@ public abstract class CharFaweChunk<T, V extends FaweQueue> extends FaweChunk<T>
case 62:
case 50:
case 10:
getParent().getRelighter().addLightUpdate((getX() << 4) + x, y, (getZ() << 4) + z);
default:
vs[j] = (char) (id << 4);
heightMap[z << 4 | x] = (byte) y;
@ -254,7 +253,6 @@ public abstract class CharFaweChunk<T, V extends FaweQueue> extends FaweChunk<T>
case 138:
case 169:
case 213:
getParent().getRelighter().addLightUpdate((getX() << 4) + x, y, (getZ() << 4) + z);
case 2:
case 4:
case 13:
@ -315,7 +313,6 @@ public abstract class CharFaweChunk<T, V extends FaweQueue> extends FaweChunk<T>
case 62:
case 50:
case 10:
getParent().getRelighter().addLightUpdate((getX() << 4) + x, y, (getZ() << 4) + z);
case 54:
case 146:
case 61:

View File

@ -152,7 +152,7 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
mcChunk = chunkServer.loadChunk(x, z);
PlayerChunkMapEntry entry = playerManager.getEntry(x, z);
if (entry != null) {
Field fieldPlayers = PlayerChunkMap.class.getDeclaredField("players");
Field fieldPlayers = PlayerChunkMap.class.getDeclaredField("field_187283_c");
fieldPlayers.setAccessible(true);
oldWatchers = (List<EntityPlayerMP>) fieldPlayers.get(entry);
playerManager.removeEntry(entry);

View File

@ -16,7 +16,6 @@ import java.lang.reflect.Method;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
@ -145,17 +144,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
mcChunk = chunkServer.loadChunk(x, z);
mcChunk.onChunkUnload();
}
PlayerChunkMap playerManager = ((WorldServer) getWorld()).getPlayerChunkMap();
List<EntityPlayerMP> oldWatchers = null;
if (chunkServer.chunkExists(x, z)) {
mcChunk = chunkServer.loadChunk(x, z);
PlayerChunkMapEntry entry = playerManager.getEntry(x, z);
if (entry != null) {
Field fieldPlayers = PlayerChunkMap.class.getDeclaredField("players");
fieldPlayers.setAccessible(true);
oldWatchers = (List<EntityPlayerMP>) fieldPlayers.get(entry);
playerManager.removeEntry(entry);
}
mcChunk.onChunkUnload();
}
try {
@ -173,11 +163,6 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
mcChunk.onChunkLoad();
mcChunk.populateChunk(chunkServer, chunkServer.chunkGenerator);
}
if (oldWatchers != null) {
for (EntityPlayerMP player : oldWatchers) {
playerManager.addPlayer(player);
}
}
return true;
} catch (Throwable t) {
MainUtil.handleError(t);