Class GoalSelector
java.lang.Object
net.minecraft.world.entity.ai.goal.GoalSelector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set
<WrappedGoal> private final Map
<Goal.Flag, WrappedGoal> Goals currently using a particular flagprivate static final WrappedGoal
private final Supplier
<ProfilerFiller> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a goal to the GoalSelector with a certain priority.void
disableControlFlag
(Goal.Flag pFlag) void
enableControlFlag
(Goal.Flag pFlag) private static boolean
goalCanBeReplacedForAllFlags
(WrappedGoal pGoal, Map<Goal.Flag, WrappedGoal> pFlag) private static boolean
goalContainsAnyFlags
(WrappedGoal pGoal, EnumSet<Goal.Flag> pFlag) void
removeAllGoals
(Predicate<Goal> pFilter) void
removeGoal
(Goal pGoal) Remove the goal from the GoalSelector.void
setControlFlag
(Goal.Flag pFlag, boolean pEnabled) void
tick()
void
tickRunningGoals
(boolean pTickAllRunning)
-
Field Details
-
NO_GOAL
-
lockedFlags
Goals currently using a particular flag -
availableGoals
-
profiler
-
disabledFlags
-
-
Constructor Details
-
GoalSelector
-
-
Method Details
-
addGoal
Add a goal to the GoalSelector with a certain priority. Lower numbers are higher priority. -
removeAllGoals
-
removeGoal
Remove the goal from the GoalSelector. This must be the same object as the goal you are trying to remove, which may not always be accessible. -
goalContainsAnyFlags
-
goalCanBeReplacedForAllFlags
private static boolean goalCanBeReplacedForAllFlags(WrappedGoal pGoal, Map<Goal.Flag, WrappedGoal> pFlag) -
tick
public void tick() -
tickRunningGoals
public void tickRunningGoals(boolean pTickAllRunning) -
getAvailableGoals
-
disableControlFlag
-
enableControlFlag
-
setControlFlag
-