mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-21 22:48:57 +01:00
Invalidate PathTypeCache when pathfinding updates are disabled
The configuration should not allow the cache to break. Additionally, invalidating the cache is cheap and as such there is no gain to avoid invalidating it.
This commit is contained in:
parent
df07e2152f
commit
b407e24c84
1 changed files with 2 additions and 2 deletions
|
@ -9,13 +9,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
this.getChunkSource().blockChanged(pos);
|
||||
+ if(this.paperConfig().misc.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
||||
this.pathTypesByPosCache.invalidate(pos);
|
||||
+ if (this.paperConfig().misc.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
||||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue