Class InteractWithDoor
java.lang.Object
net.minecraft.world.entity.ai.behavior.InteractWithDoor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final doubleprivate static final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanareOtherMobsComingThroughDoor(LivingEntity body, BlockPos doorPos, Optional<List<LivingEntity>> nearestEntities) static voidcloseDoorsThatIHaveOpenedOrPassedThrough(ServerLevel level, LivingEntity body, @Nullable Node movingFromNode, @Nullable Node movingToNode, Set<GlobalPos> doors, Optional<List<LivingEntity>> nearestEntities) static BehaviorControl<LivingEntity> create()private static booleanisDoorTooFarAway(ServerLevel level, LivingEntity body, GlobalPos doorGlobalPos) private static booleanisMobComingThroughDoor(Brain<?> otherBrain, BlockPos doorPos) rememberDoorToClose(MemoryAccessor<com.mojang.datafixers.kinds.OptionalBox.Mu, Set<GlobalPos>> doorsMemory, Optional<Set<GlobalPos>> doors, ServerLevel level, BlockPos doorPos)
-
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 body, @Nullable Node movingFromNode, @Nullable Node movingToNode, Set<GlobalPos> doors, Optional<List<LivingEntity>> nearestEntities) -
areOtherMobsComingThroughDoor
private static boolean areOtherMobsComingThroughDoor(LivingEntity body, BlockPos doorPos, Optional<List<LivingEntity>> nearestEntities) -
isMobComingThroughDoor
-
isDoorTooFarAway
private static boolean isDoorTooFarAway(ServerLevel level, LivingEntity body, GlobalPos doorGlobalPos) -
rememberDoorToClose
-