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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RaidSpawnStrategy> Codec for datapack-defined raid spawn strategies. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this raid type is currently allowed to spawn for the supplied den.type()Gets the registered strategy type used to serialize and deserialize this strategy from datapack data.
-
Field Details
-
CODEC
Codec for datapack-defined raid spawn strategies. The registeredRaidSpawnStrategyTypechooses the concrete strategy codec.
-
-
Method Details
-
type
RaidSpawnStrategyType<?> type()Gets the registered strategy type used to serialize and deserialize this strategy from datapack data.- Returns:
- The raid spawn strategy type.
-
canSpawn
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:
trueif the raid type may spawn at the den.
-