Set proper field access and use mappings for entities on spigot (#2282)

set proper field access and use mappings
Dieser Commit ist enthalten in:
Hannes Greule 2023-06-10 22:47:22 +02:00 committet von GitHub
Ursprung 689c7f62b8
Commit 083f8a4dd8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
4 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -202,8 +202,8 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
}
try {
// Non-Paper
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField("entityManager");
LEVEL_CHUNK_ENTITIES.setAccessible(true);
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField(Refraction.pickName("entityManager", "P"));
SERVER_LEVEL_ENTITY_MANAGER.setAccessible(true);
} catch (NoSuchFieldException ignored) {
}
POST_CHUNK_REWRITE = chunkRewrite;

Datei anzeigen

@ -199,8 +199,8 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
}
try {
// Non-Paper
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField("entityManager");
LEVEL_CHUNK_ENTITIES.setAccessible(true);
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField(Refraction.pickName("entityManager", "P"));
SERVER_LEVEL_ENTITY_MANAGER.setAccessible(true);
} catch (NoSuchFieldException ignored) {
}
POST_CHUNK_REWRITE = chunkRewrite;

Datei anzeigen

@ -204,8 +204,8 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
}
try {
// Non-Paper
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField("entityManager");
LEVEL_CHUNK_ENTITIES.setAccessible(true);
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField(Refraction.pickName("entityManager", "L"));
SERVER_LEVEL_ENTITY_MANAGER.setAccessible(true);
} catch (NoSuchFieldException ignored) {
}
POST_CHUNK_REWRITE = chunkRewrite;

Datei anzeigen

@ -211,7 +211,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
try {
// Non-Paper
SERVER_LEVEL_ENTITY_MANAGER = ServerLevel.class.getDeclaredField(Refraction.pickName("entityManager", "M"));
LEVEL_CHUNK_ENTITIES.setAccessible(true);
SERVER_LEVEL_ENTITY_MANAGER.setAccessible(true);
} catch (NoSuchFieldException ignored) {
}
POST_CHUNK_REWRITE = chunkRewrite;