Search in sources :

Example 1 with SwimGoal

use of org.spongepowered.api.entity.ai.goal.builtin.SwimGoal in project SpongeCommon by SpongePowered.

the class SpongeSwimGoalBuilder method build.

@Override
public SwimGoal build(Agent owner) {
    checkNotNull(owner);
    final SwimGoal task = (SwimGoal) new net.minecraft.world.entity.ai.goal.FloatGoal((Mob) owner);
    task.setSwimChance(this.chance);
    return task;
}
Also used : Mob(net.minecraft.world.entity.Mob) SwimGoal(org.spongepowered.api.entity.ai.goal.builtin.SwimGoal)

Aggregations

Mob (net.minecraft.world.entity.Mob)1 SwimGoal (org.spongepowered.api.entity.ai.goal.builtin.SwimGoal)1