Class EntityAIInteractToggleAble
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
com.minecolonies.core.entity.ai.minimal.EntityAIInteractToggleAble
public class EntityAIInteractToggleAble
extends net.minecraft.world.entity.ai.goal.Goal
AI to close toggleables when collided.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHelper class for determining toggleables and toggling them.Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.Goal.Flag -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EntityAIInteractToggleAble.ToggleAbleprotected AbstractFastMinecoloniesEntityOur citizen.static final EntityAIInteractToggleAble.ToggleAbleDefault toggleables which can be used in this AIstatic final EntityAIInteractToggleAble.ToggleAble -
Constructor Summary
ConstructorsConstructorDescriptionEntityAIInteractToggleAble(@NotNull AbstractFastMinecoloniesEntity entityIn, EntityAIInteractToggleAble.ToggleAble... toggleAbles) -
Method Summary
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, stop, toString
-
Field Details
-
FENCE_TOGGLE
Default toggleables which can be used in this AI -
TRAP_TOGGLE
-
DOOR_TOGGLE
-
entity
Our citizen.
-
-
Constructor Details
-
EntityAIInteractToggleAble
public EntityAIInteractToggleAble(@NotNull @NotNull AbstractFastMinecoloniesEntity entityIn, EntityAIInteractToggleAble.ToggleAble... toggleAbles)
-
-
Method Details
-
canUse
public boolean canUse()Checks if the Interaction should be executed.- Specified by:
canUsein classnet.minecraft.world.entity.ai.goal.Goal- Returns:
- true or false depending on the conditions.
-
start
public void start()- Overrides:
startin classnet.minecraft.world.entity.ai.goal.Goal
-
canContinueToUse
public boolean canContinueToUse()Checks if the execution is still ongoing.- Overrides:
canContinueToUsein classnet.minecraft.world.entity.ai.goal.Goal- Returns:
- true or false.
-
tick
public void tick()Updates the task and checks if the citizen passed the gate already.- Overrides:
tickin classnet.minecraft.world.entity.ai.goal.Goal
-