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 TypeMethodDescriptionbooleanbooleancanUse()private static Vec3chooseRandomPosition(Vec3 pPos, RandomSource pRandom) private static Vec3chooseRandomPositionWithRestriction(Mob pMob, Vec3 pPos, RandomSource pRandom) static Vec3getSuitableFlyToPosition(Mob pMob, int pDistanceToBlocks) private static booleanisGoodTarget(Level pLevel, Vec3 pPos, int pDistanceToBlocks) 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 pMob, Vec3 pPos, RandomSource pRandom)
-