2021-01-30 16:34:38 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: lukas81298 <lukas81298@gommehd.net>
|
|
|
|
Date: Mon, 25 Jan 2021 14:37:57 +0100
|
|
|
|
Subject: [PATCH] added option to disable pathfinding updates on block changes
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-05 10:07:35 +02:00
|
|
|
index cfe617e1a08b9c6e6c12bfe89bc9effd819eaff1..f1d384d2e235c52a00f4b6d5643ef3c1d163e94b 100644
|
2021-01-30 16:34:38 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-05 10:07:35 +02:00
|
|
|
@@ -801,4 +801,9 @@ public class PaperWorldConfig {
|
2021-01-30 16:34:38 +01:00
|
|
|
private void enderDragonsDeathAlwaysPlacesDragonEgg() {
|
|
|
|
enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean updatePathfindingOnBlockUpdate = true;
|
|
|
|
+ private void setUpdatePathfindingOnBlockUpdate() {
|
|
|
|
+ updatePathfindingOnBlockUpdate = getBoolean("update-pathfinding-on-block-update", this.updatePathfindingOnBlockUpdate);
|
|
|
|
+ }
|
|
|
|
}
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
|
2021-06-05 10:07:35 +02:00
|
|
|
index 9720f60d6a58df5f5a9b2c92e2209537aab7f010..fd204ab68d8245503c0a8c4e7ce1a0a6bac7d138 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
2021-05-09 22:50:09 +02:00
|
|
|
@@ -1684,6 +1684,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
2021-01-30 16:34:38 +01:00
|
|
|
@Override
|
|
|
|
public void notify(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, int i) {
|
|
|
|
this.getChunkProvider().flagDirty(blockposition);
|
|
|
|
+ if(this.paperConfig.updatePathfindingOnBlockUpdate) { // Paper - option to disable pathfinding updates
|
|
|
|
VoxelShape voxelshape = iblockdata.getCollisionShape(this, blockposition);
|
|
|
|
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition);
|
|
|
|
|
2021-05-09 22:50:09 +02:00
|
|
|
@@ -1712,6 +1713,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
2021-01-30 16:34:38 +01:00
|
|
|
|
|
|
|
this.tickingEntities = wasTicking; // Paper
|
|
|
|
}
|
|
|
|
+ } // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|