Package de.delinkedde.mobarenareborn.mob
Klasse MobScaler
java.lang.Object
de.delinkedde.mobarenareborn.mob.MobScaler
Spawns mobs and applies the configured scaling.
Health and attack damage are derived from the formulas.mob-health and
formulas.mob-damage expressions, which receive the per-mob base value together
with the ScalingContext variables. Scaling against party-level is what keeps
the difficulty rising with player progression. Every spawned mob is tagged in its persistent
data container with the owning arena name so it can be identified and cleaned up.
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final StringPersistent-data key storing the boss definition id on a spawned boss.static final StringPersistent-data key marking an entity as an arena mob; the stored value is the arena name.static final StringPersistent-data key storing the supply-item spec a supply-wave mob drops on death.static final StringPersistent-data key storing the base experience awarded for killing the mob. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@NotNull NamespacedKeybossKey()@NotNull NamespacedKey@Nullable LivingEntityspawn(@NotNull MobType type, @NotNull Location location, @NotNull ScalingContext context, @NotNull String arenaTag) Spawns and scales a mob.@Nullable LivingEntityspawnBoss(@NotNull EntityType entityType, @NotNull Location location, @NotNull ScalingContext context, @NotNull String arenaTag, double baseHealth, double baseDamage, double healthMultiplier, double damageMultiplier, int xpValue, @NotNull net.kyori.adventure.text.Component displayName) Spawns a boss: a named entity whose scaled health and damage are multiplied by the boss factors.@NotNull NamespacedKey@NotNull NamespacedKeyxpKey()
-
Felddetails
-
MARKER_KEY
Persistent-data key marking an entity as an arena mob; the stored value is the arena name.- Siehe auch:
-
XP_KEY
Persistent-data key storing the base experience awarded for killing the mob.- Siehe auch:
-
SUPPLY_KEY
Persistent-data key storing the supply-item spec a supply-wave mob drops on death.- Siehe auch:
-
BOSS_KEY
Persistent-data key storing the boss definition id on a spawned boss.- Siehe auch:
-
-
Konstruktordetails
-
MobScaler
- Parameter:
plugin- the owning plugin, used to namespace the marker keyconfig- the configuration manager providing the scaling formulas
-
-
Methodendetails
-
markerKey
- Gibt zurück:
- the persistent-data key used to mark arena mobs
-
xpKey
- Gibt zurück:
- the persistent-data key holding a mob's experience value
-
supplyKey
- Gibt zurück:
- the persistent-data key holding a supply mob's drop specification
-
bossKey
- Gibt zurück:
- the persistent-data key holding a boss's definition id
-
spawn
@Nullable public @Nullable LivingEntity spawn(@NotNull @NotNull MobType type, @NotNull @NotNull Location location, @NotNull @NotNull ScalingContext context, @NotNull @NotNull String arenaTag) Spawns and scales a mob.- Parameter:
type- the mob type to spawnlocation- the spawn locationcontext- the scaling context for the current wavearenaTag- the arena name stored as the marker value- Gibt zurück:
- the spawned, scaled entity, or
nullif the world is unavailable or the entity is not a living entity
-
spawnBoss
@Nullable public @Nullable LivingEntity spawnBoss(@NotNull @NotNull EntityType entityType, @NotNull @NotNull Location location, @NotNull @NotNull ScalingContext context, @NotNull @NotNull String arenaTag, double baseHealth, double baseDamage, double healthMultiplier, double damageMultiplier, int xpValue, @NotNull @NotNull net.kyori.adventure.text.Component displayName) Spawns a boss: a named entity whose scaled health and damage are multiplied by the boss factors. The boss is tagged like any other arena mob so the wave engine tracks it and cleans it up.- Parameter:
entityType- the entity type to spawnlocation- the spawn locationcontext- the scaling context for the current wavearenaTag- the arena name stored as the marker valuebaseHealth- the unscaled base health before the multiplierbaseDamage- the unscaled base damage before the multiplierhealthMultiplier- the factor applied to the scaled healthdamageMultiplier- the factor applied to the scaled damagexpValue- the base experience awarded for the killdisplayName- the custom name shown above the boss- Gibt zurück:
- the spawned boss entity, or
nullif the world is unavailable or the entity is not a living entity
-