Class InteractWithDoor
java.lang.Object
net.minecraft.world.entity.ai.behavior.InteractWithDoor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final double
private static final double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
areOtherMobsComingThroughDoor
(LivingEntity entity, BlockPos pos, Optional<List<LivingEntity>> nearestLivingEntities) static void
closeDoorsThatIHaveOpenedOrPassedThrough
(ServerLevel level, LivingEntity entity, Node previous, Node next, Set<GlobalPos> doorPositions, Optional<List<LivingEntity>> nearestLivingEntities) static BehaviorControl
<LivingEntity> create()
private static boolean
isDoorTooFarAway
(ServerLevel level, LivingEntity entity, GlobalPos pos) private static boolean
isMobComingThroughDoor
(Brain<?> brain, BlockPos pos) rememberDoorToClose
(MemoryAccessor<com.mojang.datafixers.kinds.OptionalBox.Mu, Set<GlobalPos>> doorsToClose, Optional<Set<GlobalPos>> doorPositions, ServerLevel level, BlockPos pos)
-
Field Details
-
COOLDOWN_BEFORE_RERUNNING_IN_SAME_NODE
private static final int COOLDOWN_BEFORE_RERUNNING_IN_SAME_NODE- See Also:
-
SKIP_CLOSING_DOOR_IF_FURTHER_AWAY_THAN
private static final double SKIP_CLOSING_DOOR_IF_FURTHER_AWAY_THAN- See Also:
-
MAX_DISTANCE_TO_HOLD_DOOR_OPEN_FOR_OTHER_MOBS
private static final double MAX_DISTANCE_TO_HOLD_DOOR_OPEN_FOR_OTHER_MOBS- See Also:
-
-
Constructor Details
-
InteractWithDoor
public InteractWithDoor()
-
-
Method Details
-
create
-
closeDoorsThatIHaveOpenedOrPassedThrough
public static void closeDoorsThatIHaveOpenedOrPassedThrough(ServerLevel level, LivingEntity entity, @Nullable Node previous, @Nullable Node next, Set<GlobalPos> doorPositions, Optional<List<LivingEntity>> nearestLivingEntities) -
areOtherMobsComingThroughDoor
private static boolean areOtherMobsComingThroughDoor(LivingEntity entity, BlockPos pos, Optional<List<LivingEntity>> nearestLivingEntities) -
isMobComingThroughDoor
-
isDoorTooFarAway
-
rememberDoorToClose
-