From 875b1dbac0d8fb892498fa5d56d9f18a27fd0763 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Sun, 30 Jun 2024 09:59:43 +0100 Subject: [PATCH] Add for 1.21 --- .../adapter/impl/fawe/v1_21_R1/PaperweightFaweAdapter.java | 2 +- .../adapter/impl/fawe/v1_21_R1/PaperweightGetBlocks.java | 5 ++--- .../adapter/impl/fawe/v1_21_R1/PaperweightLevelProxy.java | 2 +- .../fawe/v1_21_R1/PaperweightPlacementStateProcessor.java | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightFaweAdapter.java b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightFaweAdapter.java index 3c2d76811..be6d32017 100644 --- a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightFaweAdapter.java +++ b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightFaweAdapter.java @@ -646,7 +646,7 @@ public final class PaperweightFaweAdapter extends FaweAdapter { // Set Modified nmsChunk.setLightCorrect(true); // Set Modified @@ -831,7 +830,7 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc // send to player if (!set .getSideEffectSet() - .shouldApply(SideEffect.LIGHTING) || !Settings.settings().LIGHTING.DELAY_PACKET_SENDING || finalMask == 0 && biomes != null) { + .shouldApply(SideEffect.LIGHTING) || !Settings.settings().LIGHTING.DELAY_PACKET_SENDING || finalBitMask == 0 && biomes != null) { this.send(); } if (finalizer != null) { diff --git a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightLevelProxy.java b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightLevelProxy.java index 50c2f5a06..cedf5ae20 100644 --- a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightLevelProxy.java +++ b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightLevelProxy.java @@ -20,8 +20,8 @@ import javax.annotation.Nullable; public class PaperweightLevelProxy extends ServerLevel { protected ServerLevel serverLevel; - private PaperweightFaweAdapter adapter; private PaperweightPlacementStateProcessor processor; + private PaperweightFaweAdapter adapter; @SuppressWarnings("DataFlowIssue") private PaperweightLevelProxy() { diff --git a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightPlacementStateProcessor.java b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightPlacementStateProcessor.java index a17c7ebd8..14ae451a6 100644 --- a/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightPlacementStateProcessor.java +++ b/worldedit-bukkit/adapters/adapter-1_21/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_R1/PaperweightPlacementStateProcessor.java @@ -82,8 +82,8 @@ public class PaperweightPlacementStateProcessor extends PlacementStateProcessor new BlockHitResult(pos, side, blockPos, false), side.getOpposite() )); - return newState == null ? BlockTypesCache.ReservedIDs.AIR : - adapter.ibdIDToOrdinal(Block.BLOCK_STATE_REGISTRY.getId(newState)); + return newState == null ? BlockTypesCache.ReservedIDs.AIR : adapter.ibdIDToOrdinal(Block.BLOCK_STATE_REGISTRY.getId( + newState)); } @Override