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 pos, RandomSource random) private static Vec3chooseRandomPositionWithRestriction(Mob mob, Vec3 pos, RandomSource random) static Vec3getSuitableFlyToPosition(Mob mob, int distanceToBlocks) private static booleanisGoodTarget(Level level, Vec3 pos, int distanceToBlocks) voidstart()Methods inherited from class net.minecraft.world.entity.ai.goal.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
public boolean canUse() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
start
public void start() -
getSuitableFlyToPosition
-
isGoodTarget
-
chooseRandomPosition
-
chooseRandomPositionWithRestriction
@Nullable private static Vec3 chooseRandomPositionWithRestriction(Mob mob, Vec3 pos, RandomSource random)
-