Class WardenSpawnTracker
java.lang.Object
net.minecraft.world.entity.monster.warden.WardenSpawnTracker
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<WardenSpawnTracker> private int
private static final int
static final int
private static final double
private int
private static final int
private static final int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
copyData
(WardenSpawnTracker p_219584_) private void
private static List
<ServerPlayer> getNearbyPlayers
(ServerLevel p_219595_, BlockPos p_219596_) int
private static boolean
hasNearbyWarden
(ServerLevel p_219575_, BlockPos p_219576_) private void
private boolean
void
reset()
void
setWarningLevel
(int p_219573_) void
tick()
static OptionalInt
tryWarn
(ServerLevel p_219578_, BlockPos p_219579_, ServerPlayer p_219580_)
-
Field Details
-
CODEC
-
MAX_WARNING_LEVEL
public static final int MAX_WARNING_LEVEL- See Also:
-
PLAYER_SEARCH_RADIUS
private static final double PLAYER_SEARCH_RADIUS- See Also:
-
WARNING_CHECK_DIAMETER
private static final int WARNING_CHECK_DIAMETER- See Also:
-
DECREASE_WARNING_LEVEL_EVERY_INTERVAL
private static final int DECREASE_WARNING_LEVEL_EVERY_INTERVAL- See Also:
-
WARNING_LEVEL_INCREASE_COOLDOWN
private static final int WARNING_LEVEL_INCREASE_COOLDOWN- See Also:
-
ticksSinceLastWarning
private int ticksSinceLastWarning -
warningLevel
private int warningLevel -
cooldownTicks
private int cooldownTicks
-
-
Constructor Details
-
WardenSpawnTracker
public WardenSpawnTracker(int p_219568_, int p_219569_, int p_219570_)
-
-
Method Details
-
tick
public void tick() -
reset
public void reset() -
tryWarn
public static OptionalInt tryWarn(ServerLevel p_219578_, BlockPos p_219579_, ServerPlayer p_219580_) -
onCooldown
private boolean onCooldown() -
hasNearbyWarden
-
getNearbyPlayers
-
increaseWarningLevel
private void increaseWarningLevel() -
decreaseWarningLevel
private void decreaseWarningLevel() -
setWarningLevel
public void setWarningLevel(int p_219573_) -
getWarningLevel
public int getWarningLevel() -
copyData
-