From b5442da875c5ac644c0ac19897578b9058800b7a Mon Sep 17 00:00:00 2001 From: Warrior <50800980+Warriorrrr@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:16:07 +0100 Subject: [PATCH] Fix MC-157464 Prevent sleeping villagers moving towards food Fixes sleeping villagers moving to nearby food by adding an !isSleeping predicate Relevant links: https://bugs.mojang.com/browse/MC-157464 https://github.com/PaperMC/Paper/issues/8569 --- .../ai/behavior/VillagerGoalPackages.java.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java.patch new file mode 100644 index 0000000000..c8260c2305 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java ++++ b/net/minecraft/world/entity/ai/behavior/VillagerGoalPackages.java +@@ -42,7 +42,7 @@ + Pair.of(1, new MoveToTargetSink()), + Pair.of(2, PoiCompetitorScan.create()), + Pair.of(3, new LookAndFollowTradingPlayerSink(speed)), +- Pair.of(5, GoToWantedItem.create(speed, false, 4)), ++ Pair.of(5, GoToWantedItem.create(villager -> !villager.isSleeping(), speed, false, 4)), // Paper - Fix MC-157464 + Pair.of( + 6, + AcquirePoi.create(