mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +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);
|
||||
}
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
|
@ -76,13 +76,15 @@ index c0816b9f8..623290caa 100644
|
|||
this.tileEntityListTick.remove(tileTickPosition--);
|
||||
//this.tileEntityList.remove(tileentity); // Paper - remove unused list
|
||||
- if (this.isLoaded(tileentity.getPosition())) {
|
||||
- this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
|
||||
+ // Paper start
|
||||
+ net.minecraft.server.Chunk chunk = tileentity.getCurrentChunk();
|
||||
+ if (chunk != null) {
|
||||
+ chunk.removeTileEntity(tileentity.getPosition());
|
||||
+ // Paper end
|
||||
this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
int k = MathHelper.floor(entity.locZ / 16.0D);
|
||||
|
||||
|
|
Loading…
Reference in a new issue