3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

lock is in PalettedContainer in 1.17 (#1697)

Dieser Commit ist enthalten in:
Hannes Greule 2022-04-11 13:59:37 +02:00 committet von GitHub
Ursprung a9e43a6d78
Commit 8f1ca48bfc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -30,7 +30,6 @@ import net.minecraft.server.level.ChunkMap;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.BitStorage; import net.minecraft.util.BitStorage;
import net.minecraft.util.ThreadingDetector;
import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biome;
@ -120,7 +119,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
Unsafe unsafe = ReflectionUtils.getUnsafe(); Unsafe unsafe = ReflectionUtils.getUnsafe();
if (!PaperLib.isPaper()) { if (!PaperLib.isPaper()) {
fieldLock = ThreadingDetector.class.getDeclaredField(Refraction.pickName("lock", "m")); fieldLock = PalettedContainer.class.getDeclaredField(Refraction.pickName("lock", "m"));
fieldLockOffset = unsafe.objectFieldOffset(fieldLock); fieldLockOffset = unsafe.objectFieldOffset(fieldLock);
} else { } else {
// in paper, the used methods are synchronized properly // in paper, the used methods are synchronized properly