Skip to content

Commit

Permalink
Lower range in which penguin should leave boat.
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug committed Jan 1, 2024
1 parent deedc43 commit b2dabe2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected List<Pair<MemoryModuleType<?>, MemoryStatus>> getMemoryRequirements()

@Override
public boolean checkExtraStartConditions(ServerLevel level, Penguin penguin) {
if (penguin.tickCount < BrainUtils.getMemory(penguin, RockhoppersMemoryModuleTypes.HUNGRY_TIME) && penguin.getBoatToFollow().distanceTo(penguin) < 128.0) {
if (penguin.tickCount < BrainUtils.getMemory(penguin, RockhoppersMemoryModuleTypes.HUNGRY_TIME) && penguin.getBoatToFollow().distanceTo(penguin) < 32.0) {
return false;
}

Expand All @@ -38,13 +38,13 @@ public boolean checkExtraStartConditions(ServerLevel level, Penguin penguin) {

@Override
public boolean shouldKeepRunning(Penguin penguin) {
return penguin.distanceToSqr(this.leavingBoatPos) < 64.0 * 64.0;
return penguin.distanceToSqr(this.leavingBoatPos) < 32.0 * 32.0;
}

@Override
protected void start(Penguin penguin) {
BrainUtils.setMemory(penguin, RockhoppersMemoryModuleTypes.BOAT_TO_FOLLOW, null);
Vec3 posAway = DefaultRandomPos.getPosAway(penguin, 14, 8, leavingBoatPos);
Vec3 posAway = DefaultRandomPos.getPosAway(penguin, 32, 8, leavingBoatPos);
if (posAway != null) {
BrainUtils.setMemory(penguin, MemoryModuleType.WALK_TARGET, new WalkTarget(posAway, 1.0F, 0));
}
Expand Down

0 comments on commit b2dabe2

Please sign in to comment.