Config to allow mobs to pathfind over rails

This commit is contained in:
Encode42
2025-01-12 12:28:49 -08:00
committed by granny
parent 7f5a06d2b8
commit 504c35afb7
3 changed files with 13 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -240,7 +_,7 @@
if ((node == null || node.costMalus < 0.0F)
&& verticalDeltaLimit > 0
&& (cachedPathType != PathType.FENCE || this.canWalkOverFences())
- && cachedPathType != PathType.UNPASSABLE_RAIL
+ && (this.mob.level().purpurConfig.mobsIgnoreRails || cachedPathType != PathType.UNPASSABLE_RAIL) // Purpur - Config to allow mobs to pathfind over rails
&& cachedPathType != PathType.TRAPDOOR
&& cachedPathType != PathType.POWDER_SNOW) {
node = this.tryJumpOn(x, y, z, verticalDeltaLimit, nodeFloorLevel, direction, pathType, mutableBlockPos);