3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-10-03 04:10:06 +02:00

fix: fix paletteAlreadyInitialized + biome placement on linear clipboards

Dieser Commit ist enthalten in:
Pierre Maurice Schwang 2024-06-30 15:42:15 +02:00
Ursprung 8f4c2d5bcc
Commit 3fbf1cfbb3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 37E613079F3E5BB9

Datei anzeigen

@ -296,7 +296,7 @@ public class FastSchematicReaderV3 implements ClipboardReader {
readPalette( readPalette(
target != null, target != null,
CACHE_IDENTIFIER_BLOCK, CACHE_IDENTIFIER_BLOCK,
() -> this.blockPalette.length == 0, () -> this.blockPalette[0] != null,
this.provideBlockPaletteInitializer(), this.provideBlockPaletteInitializer(),
this.getBlockWriter(target), this.getBlockWriter(target),
(type, tag) -> { (type, tag) -> {
@ -322,7 +322,7 @@ public class FastSchematicReaderV3 implements ClipboardReader {
readPalette( readPalette(
target != null, target != null,
CACHE_IDENTIFIER_BIOMES, CACHE_IDENTIFIER_BIOMES,
() -> this.biomePalette.length == 0, () -> this.biomePalette[0] != null,
this.provideBiomePaletteInitializer(), this.provideBiomePaletteInitializer(),
this.getBiomeWriter(target), this.getBiomeWriter(target),
(type, tag) -> { (type, tag) -> {
@ -578,9 +578,6 @@ public class FastSchematicReaderV3 implements ClipboardReader {
} }
private PaletteDataApplier getBiomeWriter(Clipboard target) { private PaletteDataApplier getBiomeWriter(Clipboard target) {
if (target instanceof LinearClipboard linearClipboard) {
return (index, ordinal) -> linearClipboard.setBiome(index, this.biomePalette[ordinal]);
}
return (index, ordinal) -> indexToPosition(index, (x, y, z) -> target.setBiome(x, y, z, this.biomePalette[ordinal])); return (index, ordinal) -> indexToPosition(index, (x, y, z) -> target.setBiome(x, y, z, this.biomePalette[ordinal]));
} }