Datensatzklasse WaveSet

java.lang.Object
java.lang.Record
de.delinkedde.mobarenareborn.wave.WaveSet
Datensatzkomponenten:
name - the lower-case wave-set identifier
earlyUntil - the first wave number that no longer uses the early pool
midUntil - the first wave number that no longer uses the mid pool
early - the early-game mob pool
mid - the mid-game mob pool
late - the late-game mob pool

public record WaveSet(@NotNull String name, int earlyUntil, int midUntil, @NotNull List<String> early, @NotNull List<String> mid, @NotNull List<String> late, Map<Integer,WaveSet.Setpiece> setpieces) extends Record
A named, data-driven wave roster: which mob identifiers may spawn in the early, mid and late game.

The active pool is chosen by wave number: waves below earlyUntil draw from early, waves below midUntil from mid, and the rest from late. Within a pool a mob is picked uniformly at random. Identifiers refer to the MobRegistry. Wave sets are loaded from waves.yml by the WaveSetRegistry; arenas reference one by name (see wave-set in the arena file).

  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Klasse
    Beschreibung
    static final record 
    A hand-designed, fixed wave: exact mob counts, optional own spawnpoints, potion effects on the mobs, a health multiplier, an optional specific boss and an optional reward granted when the wave is cleared.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    WaveSet(@NotNull String name, int earlyUntil, int midUntil, @NotNull List<String> early, @NotNull List<String> mid, @NotNull List<String> late, Map<Integer,WaveSet.Setpiece> setpieces)
    Canonical constructor; defensively copies the pools.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static @NotNull WaveSet
     
    @NotNull List<String>
    Gibt den Wert für die Datensatzkomponente early zurück.
    int
    Gibt den Wert für die Datensatzkomponente earlyUntil zurück.
    final boolean
    Gibt an, ob ein anderes Objekt diesem gleich ("equal to") ist.
    static @NotNull WaveSet
    fromSection(@NotNull String name, @NotNull ConfigurationSection section)
    Parses a wave set from a configuration section.
    final int
    Gibt einen Hashcodewert für diese Objekt zurück.
    @NotNull List<String>
    Gibt den Wert für die Datensatzkomponente late zurück.
    @NotNull List<String>
    mid()
    Gibt den Wert für die Datensatzkomponente mid zurück.
    int
    Gibt den Wert für die Datensatzkomponente midUntil zurück.
    @NotNull String
    Gibt den Wert für die Datensatzkomponente name zurück.
    @NotNull String
    pick(int wave)
    Picks a mob identifier for the given wave.
    @NotNull String
    Picks a mob identifier from the early pool, regardless of the wave number.
    setpiece(int wave)
     
    Gibt den Wert für die Datensatzkomponente setpieces zurück.
    final String
    Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück.

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • WaveSet

      public WaveSet(@NotNull @NotNull String name, int earlyUntil, int midUntil, @NotNull @NotNull List<String> early, @NotNull @NotNull List<String> mid, @NotNull @NotNull List<String> late, @NotNull Map<Integer,WaveSet.Setpiece> setpieces)
      Canonical constructor; defensively copies the pools.
      Parameter:
      name - the identifier
      earlyUntil - the early-pool upper bound
      midUntil - the mid-pool upper bound
      early - the early pool
      mid - the mid pool
      late - the late pool
  • Methodendetails

    • setpiece

      @Nullable public @Nullable WaveSet.Setpiece setpiece(int wave)
      Parameter:
      wave - the wave number
      Gibt zurück:
      the hand-designed wave for that number, if one is configured
    • pick

      @NotNull public @NotNull String pick(int wave)
      Picks a mob identifier for the given wave.
      Parameter:
      wave - the wave number (1-based)
      Gibt zurück:
      a mob identifier; falls back to a non-empty pool when the selected one is empty
    • pickEarly

      @NotNull public @NotNull String pickEarly()
      Picks a mob identifier from the early pool, regardless of the wave number. Swarm waves use this so the flood consists of weak early-game mobs.
      Gibt zurück:
      an early-pool mob identifier
    • defaultSet

      @NotNull public static @NotNull WaveSet defaultSet()
      Gibt zurück:
      the built-in default wave set, used when no waves.yml entry matches
    • fromSection

      @NotNull public static @NotNull WaveSet fromSection(@NotNull @NotNull String name, @NotNull @NotNull ConfigurationSection section)
      Parses a wave set from a configuration section.
      Parameter:
      name - the wave-set identifier
      section - the configuration section
      Gibt zurück:
      the parsed wave set
    • toString

      public final String toString()
      Gibt eine Zeichenfolgendarstellung dieser Datensatzklasse zurück. Die Darstellung enthält den Namen der Klasse, gefolgt vom Namen und Wert jeder der Datensatzkomponenten.
      Angegeben von:
      toString in Klasse Record
      Gibt zurück:
      eine Zeichenfolgendarstellung dieses Objekts
    • hashCode

      public final int hashCode()
      Gibt einen Hashcodewert für diese Objekt zurück. Der Wert wird vom Hashcode jeder der Datensatzkomponenten abgeleitet.
      Angegeben von:
      hashCode in Klasse Record
      Gibt zurück:
      ein Hashcodewert für dieses Objekt
    • equals

      public final boolean equals(Object o)
      Gibt an, ob ein anderes Objekt diesem gleich ("equal to") ist. Die Objekte sind gleich, wenn das andere Objekt der gleichen Klasse angehört und alle Datensatzkomponenten gleich sind. Referenzkomponenten werden verglichen mit Objects::equals(Object,Object); primitive Komponenten werden verglichen mit "==".
      Angegeben von:
      equals in Klasse Record
      Parameter:
      o - das Objekt, mit dem verglichen wird
      Gibt zurück:
      true, wenn dieses Objekt gleich dem Argument o ist, andernfalls false.
    • name

      @NotNull public @NotNull String name()
      Gibt den Wert für die Datensatzkomponente name zurück.
      Gibt zurück:
      Wert der Datensatzkomponente name
    • earlyUntil

      public int earlyUntil()
      Gibt den Wert für die Datensatzkomponente earlyUntil zurück.
      Gibt zurück:
      Wert der Datensatzkomponente earlyUntil
    • midUntil

      public int midUntil()
      Gibt den Wert für die Datensatzkomponente midUntil zurück.
      Gibt zurück:
      Wert der Datensatzkomponente midUntil
    • early

      @NotNull public @NotNull List<String> early()
      Gibt den Wert für die Datensatzkomponente early zurück.
      Gibt zurück:
      Wert der Datensatzkomponente early
    • mid

      @NotNull public @NotNull List<String> mid()
      Gibt den Wert für die Datensatzkomponente mid zurück.
      Gibt zurück:
      Wert der Datensatzkomponente mid
    • late

      @NotNull public @NotNull List<String> late()
      Gibt den Wert für die Datensatzkomponente late zurück.
      Gibt zurück:
      Wert der Datensatzkomponente late
    • setpieces

      @NotNull public Map<Integer,WaveSet.Setpiece> setpieces()
      Gibt den Wert für die Datensatzkomponente setpieces zurück.
      Gibt zurück:
      Wert der Datensatzkomponente setpieces