Class RandomLookAroundGoal

java.lang.Object
net.minestom.server.entity.ai.GoalSelector
net.minestom.server.entity.ai.goal.RandomLookAroundGoal

public class RandomLookAroundGoal extends GoalSelector
  • Constructor Details

    • RandomLookAroundGoal

      public RandomLookAroundGoal(EntityCreature entityCreature, int chancePerTick)
    • RandomLookAroundGoal

      public RandomLookAroundGoal(EntityCreature entityCreature, int chancePerTick, @NotNull @NotNull Supplier<Integer> minimalLookTimeSupplier, @NotNull @NotNull Function<EntityCreature,Vec> randomDirectionFunction)
      Parameters:
      entityCreature - Creature that should randomly look around.
      chancePerTick - The chance (per tick) that the entity looks around. Setting this to N would mean there is a 1 in N chance.
      minimalLookTimeSupplier - A supplier that returns the minimal amount of time an entity looks in a direction.
      randomDirectionFunction - A function that returns a random vector that the entity will look in/at.
  • Method Details