Class Ghast.RandomFloatAroundGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.monster.Ghast.RandomFloatAroundGoal
Enclosing class:
Ghast

public static class Ghast.RandomFloatAroundGoal extends Goal
  • Field Details

    • MAX_ATTEMPTS

      private static final int MAX_ATTEMPTS
      See Also:
    • ghast

      private final Mob ghast
    • distanceToBlocks

      private final int distanceToBlocks
  • Constructor Details

    • RandomFloatAroundGoal

      public RandomFloatAroundGoal(Mob pGhast)
    • RandomFloatAroundGoal

      public RandomFloatAroundGoal(Mob pGhast, int pDistanceToBlocks)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class Goal
    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class Goal
    • start

      public void start()
      Overrides:
      start in class Goal
    • getSuitableFlyToPosition

      public static Vec3 getSuitableFlyToPosition(Mob pMob, int pDistanceToBlocks)
    • isGoodTarget

      private static boolean isGoodTarget(Level pLevel, Vec3 pPos, int pDistanceToBlocks)
    • chooseRandomPosition

      private static Vec3 chooseRandomPosition(Vec3 pPos, RandomSource pRandom)
    • chooseRandomPositionWithRestriction

      @Nullable private static Vec3 chooseRandomPositionWithRestriction(Mob pMob, Vec3 pPos, RandomSource pRandom)