Interface RaidSpawnStrategy

All Known Implementing Classes:
ConfigOnceADayRaidSpawnStrategy, OnceADayRaidSpawnStrategy

public interface RaidSpawnStrategy
Defines how a raid type decides whether it may roll or create a raid for a den.

The spawn strategy is concerned with raid availability and timing for a den. It answers whether the raid type is allowed to participate in a spawn roll for that den at this moment.

This strategy should not choose the boss Pokemon, star value, rewards, or battle topology. Those details belong to the selected RaidSpawnSet, den/instance data, loot table configuration, and BattleStartStrategy. Keeping those responsibilities separate lets the same spawn data be reused by multiple raid types.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<RaidSpawnStrategy>
    Codec for datapack-defined raid spawn strategies.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether this raid type is currently allowed to spawn for the supplied den.
    Gets the registered strategy type used to serialize and deserialize this strategy from datapack data.
  • Field Details

    • CODEC

      static final com.mojang.serialization.Codec<RaidSpawnStrategy> CODEC
      Codec for datapack-defined raid spawn strategies. The registered RaidSpawnStrategyType chooses the concrete strategy codec.
  • Method Details

    • type

      Gets the registered strategy type used to serialize and deserialize this strategy from datapack data.
      Returns:
      The raid spawn strategy type.
    • canSpawn

      boolean canSpawn(DenEntity den)
      Checks whether this raid type is currently allowed to spawn for the supplied den.
      Parameters:
      den - The den being considered for a raid spawn.
      Returns:
      true if the raid type may spawn at the den.