Class WardenSpawnTracker

java.lang.Object
net.minecraft.world.entity.monster.warden.WardenSpawnTracker

public class WardenSpawnTracker extends Object
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<WardenSpawnTracker> 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

      private static boolean hasNearbyWarden(ServerLevel p_219575_, BlockPos p_219576_)
    • getNearbyPlayers

      private static List<ServerPlayer> getNearbyPlayers(ServerLevel p_219595_, BlockPos p_219596_)
    • increaseWarningLevel

      private void increaseWarningLevel()
    • decreaseWarningLevel

      private void decreaseWarningLevel()
    • setWarningLevel

      public void setWarningLevel(int p_219573_)
    • getWarningLevel

      public int getWarningLevel()
    • copyData

      private void copyData(WardenSpawnTracker p_219584_)