From d9350c720e8ab57eceff41f52d2e9133b1c945c5 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Mon, 12 Aug 2024 11:48:06 +0200 Subject: [PATCH] fixed #836 --- changelog.md | 1 + .../net/mca/entity/ai/pathfinder/VillagerLandPathNodeMaker.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 9e3f00a14a..7eaa495d3d 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ * Villager can now glow while invisible * You can now whistle villagers when they sit in vehicles * Height now affects Hemoglobin levels +* Villagers no longer jump in front of gates # 7.5.18 diff --git a/common/src/main/java/net/mca/entity/ai/pathfinder/VillagerLandPathNodeMaker.java b/common/src/main/java/net/mca/entity/ai/pathfinder/VillagerLandPathNodeMaker.java index 0e99060904..deb188a7b1 100644 --- a/common/src/main/java/net/mca/entity/ai/pathfinder/VillagerLandPathNodeMaker.java +++ b/common/src/main/java/net/mca/entity/ai/pathfinder/VillagerLandPathNodeMaker.java @@ -358,7 +358,7 @@ public ExtendedPathNodeType findNearbyNodeTypes(BlockView world, int x, int y, i pathNodeType = adjustNodeType(world, canOpenDoors, canEnterOpenDoors, pos, pathNodeType); // Villager can also open gates - if (blockState.isIn(BlockTags.FENCE_GATES, state -> state.getBlock() instanceof FenceGateBlock)) { + if (Config.getServerConfig().useSmarterDoorAI && blockState.isIn(BlockTags.FENCE_GATES, state -> state.getBlock() instanceof FenceGateBlock)) { pathNodeType = ExtendedPathNodeType.WALKABLE_DOOR; }