mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
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
This commit is contained in:
parent
d1abd737aa
commit
b5442da875
1 changed files with 11 additions and 0 deletions
|
@ -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(
|
Loading…
Reference in a new issue