Possibly fixes #563

This commit is contained in:
Jesse Boyd 2017-08-29 21:23:19 +10:00
parent 356c5431ec
commit c7c425cab1
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -477,8 +477,12 @@ public class BukkitQueue17 extends BukkitQueue_0<net.minecraft.server.v1_7_R4.Ch
} }
} }
public void sendChunk(net.minecraft.server.v1_7_R4.Chunk nmsChunk, int mask) { public void sendChunk(net.minecraft.server.v1_7_R4.Chunk nmsChunk, final int finalMask) {
TaskManager.IMP.sync(new RunnableVal<Object>() {
@Override
public void run(Object value) {
try { try {
int mask = finalMask;
ChunkCoordIntPair pos = nmsChunk.l(); // getPosition() ChunkCoordIntPair pos = nmsChunk.l(); // getPosition()
WorldServer w = (WorldServer) nmsChunk.world; WorldServer w = (WorldServer) nmsChunk.world;
PlayerChunkMap chunkMap = w.getPlayerChunkMap(); PlayerChunkMap chunkMap = w.getPlayerChunkMap();
@ -565,6 +569,8 @@ public class BukkitQueue17 extends BukkitQueue_0<net.minecraft.server.v1_7_R4.Ch
MainUtil.handleError(e); MainUtil.handleError(e);
} }
} }
});
}
public boolean hasEntities(net.minecraft.server.v1_7_R4.Chunk nmsChunk) { public boolean hasEntities(net.minecraft.server.v1_7_R4.Chunk nmsChunk) {
for (int i = 0; i < nmsChunk.entitySlices.length; i++) { for (int i = 0; i < nmsChunk.entitySlices.length; i++) {