ForgePatch/patches/minecraft/net/minecraft/pathfinding/PathNodeType.java.patch

17 lines
578 B
Diff

--- a/net/minecraft/pathfinding/PathNodeType.java
+++ b/net/minecraft/pathfinding/PathNodeType.java
@@ -35,4 +35,13 @@
public float func_186289_a() {
return this.field_186307_r;
}
+
+ @javax.annotation.Nullable
+ public PathNodeType getDanger() {
+ return (this == DAMAGE_FIRE || this == DANGER_FIRE ) ? DANGER_FIRE :
+ (this == DAMAGE_CACTUS || this == DANGER_CACTUS) ? DANGER_CACTUS :
+ (this == DAMAGE_OTHER || this == DANGER_OTHER ) ? DANGER_OTHER :
+ (this == LAVA) ? DAMAGE_FIRE :
+ null;
+ }
}