minecraft-src/net/minecraft/world/entity/ai/goal/RandomSwimmingGoal.java
2025-07-04 01:41:11 +03:00

18 lines
527 B
Java

package net.minecraft.world.entity.ai.goal;
import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.entity.ai.behavior.BehaviorUtils;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
public class RandomSwimmingGoal extends RandomStrollGoal {
public RandomSwimmingGoal(PathfinderMob pathfinderMob, double d, int i) {
super(pathfinderMob, d, i);
}
@Nullable
@Override
protected Vec3 getPosition() {
return BehaviorUtils.getRandomSwimmablePos(this.mob, 10, 7);
}
}