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:
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user