Interface MobSpawnCost

All Superinterfaces:
Wrapper

@NullMarked @AsOf("4.0.0") public interface MobSpawnCost extends Wrapper
A mob's biome spawn cost.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    The energy charged for each nearby mob of this type.
    decode(Object minecraftMobSpawnCost)
    Reads a Minecraft mob spawn cost.
    double
    The maximum local energy budget available to the mob.
    of(double energyBudget, double charge)
    Creates a mob spawn cost.

    Methods inherited from interface Wrapper

    asHandle, toMinecraft, unwrap
  • Method Details

    • energyBudget

      @AsOf("4.0.0") double energyBudget()
      The maximum local energy budget available to the mob.
      Returns:
      the mob's energy budget
      Since:
      4.0.0
    • charge

      @AsOf("4.0.0") double charge()
      The energy charged for each nearby mob of this type.
      Returns:
      the per-mob charge
      Since:
      4.0.0
    • of

      @AsOf("4.0.0") static MobSpawnCost of(double energyBudget, double charge)
      Creates a mob spawn cost.
      Parameters:
      energyBudget - the maximum local energy budget available to the mob
      charge - the energy charged for each nearby mob of this type
      Returns:
      a new mob spawn cost
      Since:
      4.0.0
    • decode

      @AsOf("4.0.0") static MobSpawnCost decode(Object minecraftMobSpawnCost)
      Reads a Minecraft mob spawn cost.
      Parameters:
      minecraftMobSpawnCost - the Minecraft mob spawn cost to read
      Returns:
      the wrapped mob spawn cost
      Since:
      4.0.0