Class Ghast.RandomFloatAroundGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.monster.Ghast.RandomFloatAroundGoal
- Enclosing class:
Ghast
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRandomFloatAroundGoal(Mob ghast) RandomFloatAroundGoal(Mob ghast, int distanceToBlocks) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanUse()private static Vec3chooseRandomPosition(Vec3 center, RandomSource random) private static @Nullable Vec3chooseRandomPositionWithRestriction(Mob mob, Vec3 center, RandomSource random) static Vec3getSuitableFlyToPosition(Mob mob, int distanceToBlocks) private static booleanisGoodTarget(Level level, Vec3 target, int distanceToBlocks) voidstart()Methods inherited from class Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, stop, tick, toString
-
Field Details
-
MAX_ATTEMPTS
private static final int MAX_ATTEMPTS- See Also:
-
ghast
-
distanceToBlocks
private final int distanceToBlocks
-
-
Constructor Details
-
RandomFloatAroundGoal
-
RandomFloatAroundGoal
-
-
Method Details
-
canUse
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
-
getSuitableFlyToPosition
-
isGoodTarget
-
chooseRandomPosition
-
chooseRandomPositionWithRestriction
private static @Nullable Vec3 chooseRandomPositionWithRestriction(Mob mob, Vec3 center, RandomSource random)
-