mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fix some issues with java 9 / reflection
This commit is contained in:
@ -231,9 +231,8 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
|
||||
int xx = bx + x;
|
||||
|
||||
BlockTypes type = BlockTypes.getFromStateId(combined);
|
||||
if (type == BlockTypes.__RESERVED__) continue;
|
||||
switch (type) {
|
||||
case __RESERVED__:
|
||||
continue;
|
||||
case AIR:
|
||||
case CAVE_AIR:
|
||||
case VOID_AIR:
|
||||
@ -280,9 +279,8 @@ public class BukkitChunk_All extends IntFaweChunk<Chunk, BukkitQueue_All> {
|
||||
int j = place ? index : 4095 - index;
|
||||
int combined = newArray[j];
|
||||
BlockTypes type = BlockTypes.getFromStateId(combined);
|
||||
if (type == BlockTypes.__RESERVED__) continue;
|
||||
switch (type) {
|
||||
case __RESERVED__:
|
||||
continue;
|
||||
case AIR:
|
||||
case CAVE_AIR:
|
||||
case VOID_AIR:
|
||||
|
@ -130,6 +130,19 @@ public class AsyncChunk implements Chunk {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState[] getTileEntities(boolean b) {
|
||||
if (!isLoaded()) {
|
||||
return new BlockState[0];
|
||||
}
|
||||
return TaskManager.IMP.sync(new RunnableVal<BlockState[]>() {
|
||||
@Override
|
||||
public void run(BlockState[] value) {
|
||||
this.value = world.getChunkAt(x, z).getTileEntities(b);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
return world.isChunkLoaded(x, z);
|
||||
|
Reference in New Issue
Block a user