From 8f1ca48bfc7d35b6e6b66702d1a60029359b8b92 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Mon, 11 Apr 2022 13:59:37 +0200 Subject: [PATCH] lock is in PalettedContainer in 1.17 (#1697) --- .../impl/fawe/v1_17_R1_2/PaperweightPlatformAdapter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightPlatformAdapter.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightPlatformAdapter.java index b4039fdc0..a34bbb3f3 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightPlatformAdapter.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/PaperweightPlatformAdapter.java @@ -30,7 +30,6 @@ import net.minecraft.server.level.ChunkMap; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.BitStorage; -import net.minecraft.util.ThreadingDetector; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.biome.Biome; @@ -120,7 +119,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter { Unsafe unsafe = ReflectionUtils.getUnsafe(); if (!PaperLib.isPaper()) { - fieldLock = ThreadingDetector.class.getDeclaredField(Refraction.pickName("lock", "m")); + fieldLock = PalettedContainer.class.getDeclaredField(Refraction.pickName("lock", "m")); fieldLockOffset = unsafe.objectFieldOffset(fieldLock); } else { // in paper, the used methods are synchronized properly