mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Improved pathfinding, and made NPCs able to traverse through lava/fire sources and water if immune to fire or able to breathe in water respectively.
This commit is contained in:
1 parent
081c47b0aa
commit
2c1a5d330a
2 files changed
+74
-46
No files matched your search
@@ -1620,6 +1620,16 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
this.isImmuneToFire = immuneToFire;
|
||||
stats.immuneToFire = immuneToFire;
|
||||
}
|
||||
|
||||
public boolean handleLavaMovement()
|
||||
{
|
||||
return !stats.immuneToFire && super.handleLavaMovement();
|
||||
}
|
||||
|
||||
public boolean handleWaterMovement()
|
||||
{
|
||||
return stats.drowningType == 1 && super.handleWaterMovement();
|
||||
}
|
||||
|
||||
public void setAvoidWater(boolean avoidWater) {
|
||||
this.getNavigator().setAvoidsWater(avoidWater);
|
||||
|
||||
Reference in new issue
Block a user