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 pGhast) RandomFloatAroundGoal
(Mob pGhast, int pDistanceToBlocks) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canUse()
private static Vec3
chooseRandomPosition
(Vec3 pPos, RandomSource pRandom) private static Vec3
chooseRandomPositionWithRestriction
(Mob pMob, Vec3 pPos, RandomSource pRandom) static Vec3
getSuitableFlyToPosition
(Mob pMob, int pDistanceToBlocks) private static boolean
isGoodTarget
(Level pLevel, Vec3 pPos, int pDistanceToBlocks) void
start()
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:
canContinueToUse
in classGoal
-
start
public void start() -
getSuitableFlyToPosition
-
isGoodTarget
-
chooseRandomPosition
-
chooseRandomPositionWithRestriction
@Nullable private static Vec3 chooseRandomPositionWithRestriction(Mob pMob, Vec3 pPos, RandomSource pRandom)
-