mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Missed a case where to remove a chunk lookup on TE removal (performance, not bug fix)
This commit is contained in:
parent
233a81a4ba
commit
8ddd9ddefc
1 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,7 @@ index 71d0db3f3..a51b648c5 100644
|
||||||
this.a(entity, entity.ac);
|
this.a(entity, entity.ac);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index c0816b9f8..623290caa 100644
|
index c0816b9f8..b1e7b63e0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||||
|
@ -76,11 +76,13 @@ index c0816b9f8..623290caa 100644
|
||||||
this.tileEntityListTick.remove(tileTickPosition--);
|
this.tileEntityListTick.remove(tileTickPosition--);
|
||||||
//this.tileEntityList.remove(tileentity); // Paper - remove unused list
|
//this.tileEntityList.remove(tileentity); // Paper - remove unused list
|
||||||
- if (this.isLoaded(tileentity.getPosition())) {
|
- if (this.isLoaded(tileentity.getPosition())) {
|
||||||
|
- this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ net.minecraft.server.Chunk chunk = tileentity.getCurrentChunk();
|
+ net.minecraft.server.Chunk chunk = tileentity.getCurrentChunk();
|
||||||
+ if (chunk != null) {
|
+ if (chunk != null) {
|
||||||
|
+ chunk.removeTileEntity(tileentity.getPosition());
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||||
|
|
Loading…
Reference in a new issue