RandomSwimmingGoal .java

net.minecraft.world.entity.ai.goal.RandomSwimmingGoal (class, 18 lines): members: getPosition. imports: BehaviorUtils, PathfinderMob, Vec3, Nullable.

net.minecraft.world.entity.ai.goalclass18 linescommonextends RandomStrollGoal561 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

RandomSwimmingGoal.java18 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.entity.ai.goal;
2
3
import net.minecraft.world.entity.PathfinderMob;
4
import net.minecraft.world.entity.ai.behavior.BehaviorUtils;
5
import net.minecraft.world.phys.Vec3;
6
import org.jspecify.annotations.Nullable;
7
8
public class RandomSwimmingGoal extends RandomStrollGoal {
9
	public RandomSwimmingGoal(final PathfinderMob mob, final double speedModifier, final int interval) {
10
		super(mob, speedModifier, interval);
11
	}
12
13
	@Override
14
	protected @Nullable Vec3 getPosition() {
15
		return BehaviorUtils.getRandomSwimmablePos(this.mob, 10, 7);
16
	}
17
}
18

Decompiled Minecraft 26.3 source of RandomSwimmingGoal (net/minecraft/world/entity/ai/goal/RandomSwimmingGoal.java) with Mojang official mappings, stored verbatim on the site.