Skip to content

Commit

Permalink
Let NPCs swim on the top of liquids
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jul 27, 2020
1 parent 83d0cef commit c6e2279
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -49,7 +49,7 @@ public PassableState isPassable(BlockSource source, PathPoint point) {
Material above = source.getMaterialAt(pos.getBlockX(), pos.getBlockY() + 1, pos.getBlockZ());
Material below = source.getMaterialAt(pos.getBlockX(), pos.getBlockY() - 1, pos.getBlockZ());
Material in = source.getMaterialAt(pos);
if (!below.isBlock() || (!isClimbable(below) && !canStandOn(below))) {
if (!isClimbable(below) && !isLiquid(in) && (!below.isBlock() && !canStandOn(below))) {
return PassableState.UNPASSABLE;
}
if (isClimbable(in) && (isClimbable(above) || isClimbable(below))) {
Expand Down

0 comments on commit c6e2279

Please sign in to comment.