Improve AI: bed memory (30-block search), relationship-based follow goal, crouch fixes

- EllieSleepGoal: check stored bedPos first, search 30 blocks on miss
- releaseBed() no longer clears memory; forgetBed() for destruction
- New FollowPlayerGoal: 50-75% distant follow, 75-99% closer, 100% approach
- fix: crouch animation thenLoop, idle doesn't override crouching
- fix: sleep Y rotation = facing.toYRot() (head toward headboard)
- fix: checkLowCeiling scan range reduced (2-4 blocks, 3 for path)
This commit is contained in:
2026-06-09 21:27:11 +03:00
parent f5d318f02e
commit 31a21f2f45
4 changed files with 119 additions and 4 deletions
@@ -78,7 +78,10 @@ public class Main {
EllieEntity.class,
new net.minecraft.world.phys.AABB(pos).inflate(2),
e -> e.isSleeping() && pos.equals(e.getBedPos())
).forEach(EllieEntity::wakeUp);
).forEach(e -> {
e.wakeUp();
e.forgetBed();
});
}
}
}