Fix early registry access in xray patch

This commit is contained in:
Nassim Jahnke 2022-03-02 10:28:32 +01:00
parent b1afebbd52
commit d3caeeb6c2
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -258,7 +258,7 @@ index 0000000000000000000000000000000000000000..aabad39d13ead83042ec2e4dd7f4ed49
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..539fff5387d9e4fcf31a5e242d7275b66e0ade88 index 0000000000000000000000000000000000000000..3916d99c746d952e7ae6c3dde750d08f3f208e3e
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +1,660 @@ @@ -0,0 +1,660 @@
@ -378,7 +378,7 @@ index 0000000000000000000000000000000000000000..539fff5387d9e4fcf31a5e242d7275b6
+ } + }
+ } + }
+ +
+ EmptyLevelChunk emptyChunk = new EmptyLevelChunk(level, new ChunkPos(0, 0), level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getHolderOrThrow(Biomes.PLAINS)); + EmptyLevelChunk emptyChunk = new EmptyLevelChunk(level, new ChunkPos(0, 0), MinecraftServer.getServer().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY).getHolderOrThrow(Biomes.PLAINS));
+ BlockPos zeroPos = new BlockPos(0, 0, 0); + BlockPos zeroPos = new BlockPos(0, 0, 0);
+ +
+ for (int i = 0; i < solidGlobal.length; i++) { + for (int i = 0; i < solidGlobal.length; i++) {