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 pEntity, BlockPos pPos, Optional<List<LivingEntity>> pNearestLivingEntities) static void
closeDoorsThatIHaveOpenedOrPassedThrough
(ServerLevel pLevel, LivingEntity pEntity, Node pPrevious, Node pNext, Set<GlobalPos> pDoorPositions, Optional<List<LivingEntity>> pNearestLivingEntities) static BehaviorControl
<LivingEntity> create()
private static boolean
isDoorTooFarAway
(ServerLevel pLevel, LivingEntity pEntity, GlobalPos pPos) private static boolean
isMobComingThroughDoor
(Brain<?> pBrain, BlockPos pPos) rememberDoorToClose
(MemoryAccessor<com.mojang.datafixers.kinds.OptionalBox.Mu, Set<GlobalPos>> pDoorsToClose, Optional<Set<GlobalPos>> pDoorPositions, ServerLevel pLevel, BlockPos pPos)
-
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 pLevel, LivingEntity pEntity, @Nullable Node pPrevious, @Nullable Node pNext, Set<GlobalPos> pDoorPositions, Optional<List<LivingEntity>> pNearestLivingEntities) -
areOtherMobsComingThroughDoor
private static boolean areOtherMobsComingThroughDoor(LivingEntity pEntity, BlockPos pPos, Optional<List<LivingEntity>> pNearestLivingEntities) -
isMobComingThroughDoor
-
isDoorTooFarAway
-
rememberDoorToClose
-