fix NMS queue palette size

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-14 21:43:06 +10:00
Ursprung b3e1076868
Commit fab197034e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
3 geänderte Dateien mit 11 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -297,6 +297,7 @@ public class BukkitChunk_1_13 extends IntFaweChunk<Chunk, BukkitQueue_1_13> {
net.minecraft.server.v1_13_R2.Chunk nmsChunk = ((CraftChunk) chunk).getHandle();
nmsChunk.f(true); // Set Modified
nmsChunk.mustSave = true;
nmsChunk.markDirty();
net.minecraft.server.v1_13_R2.World nmsWorld = nmsChunk.world;
ChunkSection[] sections = nmsChunk.getSections();
List<Entity>[] entities = nmsChunk.getEntitySlices();

Datei anzeigen

@ -700,7 +700,6 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
} else {
dirtyBits |= mask;
}
System.out.println("Mask is " + dirtyBits);
fieldDirtyBits.set(playerChunk, dirtyBits);
fieldDirtyCount.set(playerChunk, 64);
@ -829,7 +828,7 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
}
public static void setCount(int tickingBlockCount, int nonEmptyBlockCount, ChunkSection section) throws NoSuchFieldException, IllegalAccessException {
// fieldFluidCount.set(section, 0); // TODO FIXME
fieldFluidCount.set(section, 0); // TODO FIXME
fieldTickingBlockCount.set(section, tickingBlockCount);
fieldNonEmptyBlockCount.set(section, nonEmptyBlockCount);
}
@ -911,7 +910,7 @@ public class BukkitQueue_1_13 extends BukkitQueue_0<net.minecraft.server.v1_13_R
try {
fieldBits.set(dataPaletteBlocks, nmsBits);
fieldPalette.set(dataPaletteBlocks, palette);
fieldSize.set(dataPaletteBlocks, num_palette);
fieldSize.set(dataPaletteBlocks, bitsPerEntry);
setCount(0, 4096 - air, section);
} catch (IllegalAccessException | NoSuchFieldException e) {
throw new RuntimeException(e);

Datei anzeigen

@ -87,6 +87,14 @@ public class MaskedFaweQueue extends DelegateFaweQueue {
return false;
}
@Override
public boolean setBiome(int x, int y, int z, BiomeType biome) {
if (region.contains(x, y, z)) {
return super.setBiome(x, y, z, biome);
}
return false;
}
@Override
public boolean setBiome(BlockVector2 position, BiomeType biome) {
if (region.contains(position.getBlockX(), position.getBlockZ())) {