Klasse WaveEngine
java.lang.Object
de.delinkedde.mobarenareborn.wave.WaveEngine
Drives the wave loop for a running arena round.
Once started the engine spawns a wave, then ticks once per second: it prunes dead mobs and,
when the wave is cleared, runs a short intermission (the safe phase) before the next, larger
wave. Wave size comes from the formulas.wave-amount expression; per-mob stats are scaled
by the MobScaler. The roster grows in difficulty with the wave number.
The engine is owned by an arena session, which supplies the live players and the broadcast
sink, and calls stop() when the round ends to remove any remaining mobs.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungWaveEngine(@NotNull MobArenaPlugin plugin, @NotNull Arena arena, @NotNull ConfigManager config, @NotNull MobRegistry registry, @NotNull MobScaler scaler, @NotNull BossRegistry bossRegistry, @NotNull WaveSet waveSet, @NotNull Supplier<List<Player>> playersSupplier, @NotNull DoubleSupplier partyLevelSupplier, @NotNull Consumer<String> broadcaster, @NotNull ArenaHud hud, @NotNull IntConsumer waveClearedCallback) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintsetpieceRewardFor(int wave) voidstart()Starts the wave loop and spawns the first wave.voidstop()Stops the loop and removes any remaining arena mobs.
-
Konstruktordetails
-
WaveEngine
public WaveEngine(@NotNull @NotNull MobArenaPlugin plugin, @NotNull @NotNull Arena arena, @NotNull @NotNull ConfigManager config, @NotNull @NotNull MobRegistry registry, @NotNull @NotNull MobScaler scaler, @NotNull @NotNull BossRegistry bossRegistry, @NotNull @NotNull WaveSet waveSet, @NotNull @NotNull Supplier<List<Player>> playersSupplier, @NotNull @NotNull DoubleSupplier partyLevelSupplier, @NotNull @NotNull Consumer<String> broadcaster, @NotNull @NotNull ArenaHud hud, @NotNull @NotNull IntConsumer waveClearedCallback) - Parameter:
plugin- the owning plugin, used for schedulingarena- the arena being playedconfig- the configuration managerregistry- the mob registryscaler- the mob scaler used to spawn and scale mobsbossRegistry- the boss registry used on boss waveswaveSet- the wave set defining which mobs spawn per waveplayersSupplier- supplies the currently live players in the roundpartyLevelSupplier- supplies the party's average class level, fed to the scaling formulasbroadcaster- receives MiniMessage strings to broadcast to the roundhud- the heads-up display to update each tickwaveClearedCallback- notified with the wave number each time a wave is cleared
-
-
Methodendetails
-
start
public void start()Starts the wave loop and spawns the first wave. -
stop
public void stop()Stops the loop and removes any remaining arena mobs. Idempotent. -
currentWave
public int currentWave()- Gibt zurück:
- the current wave number
-
setpieceRewardFor
- Parameter:
wave- the cleared wave- Gibt zurück:
- the setpiece reward item for that wave, if configured
-