Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/patches/removed/1.17/0372-Reduce-sync-loads.patch
Jason Penilla 4d40e87b33
Update sync chunk load debug patch
Had to drop some hunks modifying getEntities, as those methods were rewritten by Mojang in 1.17
2021-06-15 17:50:38 -07:00

34 Zeilen
1.8 KiB
Diff

These hunks are for getEntities, which Mojang rewrote in 1.17.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 3a1b9f1ba19b28cebdafeb3b2476217d47213862..3e2cd6c7a34c1a792d7346019a8b039d1f4a7c04 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1130,7 +1130,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
for (int i1 = i; i1 <= j; ++i1) {
for (int j1 = k; j1 <= l; ++j1) {
- LevelChunk chunk = ichunkprovider.getChunk(i1, j1, false);
+ LevelChunk chunk = (LevelChunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
chunk.getEntities(except, box, list, predicate);
@@ -1151,7 +1151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
for (int i1 = i; i1 < j; ++i1) {
for (int j1 = k; j1 < l; ++j1) {
- LevelChunk chunk = this.getChunkSource().getChunk(i1, j1, false);
+ LevelChunk chunk = (LevelChunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
chunk.getEntities(type, box, list, predicate);
@@ -1174,7 +1174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
for (int i1 = i; i1 < j; ++i1) {
for (int j1 = k; j1 < l; ++j1) {
- LevelChunk chunk = ichunkprovider.getChunk(i1, j1, false);
+ LevelChunk chunk = (LevelChunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
chunk.getEntitiesOfClass(entityClass, box, list, predicate);