Class RarityMultiplier

java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.conditions.RarityMultiplier

public class RarityMultiplier extends Object
A component of SpawnInfo which mutates the rarity of the spawn if the location it is trying to spawn at satisfies the condition and does not satisfy the anticondition.
  • Field Details

    • multiplier

      public float multiplier
      The float by which to multiply the standard rarity should the conditions fit.
    • condition

      public SpawnCondition condition
      The SpawnCondition that must be passed to apply this multiplier.
    • anticondition

      public SpawnCondition anticondition
      The SpawnCondition that must be failed to apply this multiplier.
  • Constructor Details

    • RarityMultiplier

      public RarityMultiplier()
  • Method Details

    • apply

      public float apply(SpawnInfo spawnInfo, SpawnLocation spawnLocation, float rarity)
      Returns the transformed rarity if the given SpawnLocation satisfies the conditions, or the unmodified rarity otherwise.
    • onImport

      public void onImport()