mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 17:17:13 +01:00
4d40e87b33
Had to drop some hunks modifying getEntities, as those methods were rewritten by Mojang in 1.17
33 lines
1.8 KiB
Diff
33 lines
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);
|