mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Work towards 1.16 compatibility
This commit will allow the branch to build properly but the plugin will not function properly due to the lack of a proper adapter implementation. Proceeding will require the implementation of the SideEffects system from upstream (865c3a24d2 (diff-8fd33296e427c87d0296ad7f3ccc050a)
).
This commit is contained in:
@ -38,6 +38,8 @@ public final class BukkitAdapter_1_16_1 extends NMSAdapter {
|
||||
public final static Field fieldPalette;
|
||||
public final static Field fieldSize;
|
||||
|
||||
public final static Field fieldBitsPerEntry;
|
||||
|
||||
public final static Field fieldFluidCount;
|
||||
public final static Field fieldTickingBlockCount;
|
||||
public final static Field fieldNonEmptyBlockCount;
|
||||
@ -61,6 +63,9 @@ public final class BukkitAdapter_1_16_1 extends NMSAdapter {
|
||||
fieldPalette = DataPaletteBlock.class.getDeclaredField("h");
|
||||
fieldPalette.setAccessible(true);
|
||||
|
||||
fieldBitsPerEntry = DataBits.class.getDeclaredField("c");
|
||||
fieldBitsPerEntry.setAccessible(true);
|
||||
|
||||
fieldFluidCount = ChunkSection.class.getDeclaredField("e");
|
||||
fieldFluidCount.setAccessible(true);
|
||||
fieldTickingBlockCount = ChunkSection.class.getDeclaredField("tickingBlockCount");
|
||||
|
@ -465,7 +465,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks {
|
||||
tag.set("x", NBTTagInt.a(x));
|
||||
tag.set("y", NBTTagInt.a(y));
|
||||
tag.set("z", NBTTagInt.a(z));
|
||||
tileEntity.load(tag);
|
||||
tileEntity.load(tileEntity.getBlock(), tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -550,7 +550,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks {
|
||||
final DataBits bits = (DataBits) BukkitAdapter_1_16_1.fieldBits.get(blocks);
|
||||
final DataPalette<IBlockData> palette = (DataPalette<IBlockData>) BukkitAdapter_1_16_1.fieldPalette.get(blocks);
|
||||
|
||||
final int bitsPerEntry = bits.c();
|
||||
final int bitsPerEntry = (int) BukkitAdapter_1_16_1.fieldBitsPerEntry.get(bits);
|
||||
final long[] blockStates = bits.a();
|
||||
|
||||
new BitArray(bitsPerEntry, 4096, blockStates).toRaw(data);
|
||||
|
Reference in New Issue
Block a user