Record Class RaidType
- Record Components:
renderOptions- The den model, active-raid visual effect, and optional active-light configuration.eligibleSpawns- The spawn sets this raid type can draw from when creating raid instances.eligibleAllies- The ally sets this raid type can draw from when filling non-player raid slots.adminItems- The items an empty den of this raid type accepts to force-create a raid. Normal admin items roll from this raid type's eligible spawns; special admin items may create raids with item-specific rules.spawnStrategy- The strategy used to decide whether this raid type may spawn for a given den.battleStartStrategy- The strategy used to create the battle or battles for this raid type.raidStrategies- The strategies applied during the raid battle lifecycle.intentHandlers- The server-side handlers this raid type allows for client raid intents, keyed by the intent type id.
A raid type describes the reusable rules for a raid mode, such as Dynamax, Gigantamax, or Terastal raids. It does not represent one spawned raid instance and should not own the concrete Pokemon, rolled star value, rolled rewards, or den-specific loot behavior for that instance.
The render options define the den presentation for this type, including its model,
active-raid visual effects, and optional active block light. The eligible spawn sets define which RaidSpawnSet entries
this type may draw from. The eligible ally sets define which RaidAllySet entries this
type may use when filling non-player raid slots. The admin item set defines which items an empty
den of this type accepts to force-create a raid. Ordinary admin items roll from this raid type's
configured spawn pool; special admin items may provide their own item-specific raid creation
behavior. The spawn strategy decides whether this type may roll or create a raid for a den. The
battle start strategy owns the battle topology used when the raid begins. The raid strategies own
battle-time behavior after the boss participant exists. The intent handler map owns server-side
responses to client raid intents, allowing different raid types to interpret the same client
request differently or reject it by leaving it unmapped.
CODEC is the full datapack codec for server-side raid configuration. NETWORK_CODEC intentionally syncs only the visual options because clients only need the rendered
den appearance and effects, not the server-owned spawn, ally, battle strategy, or intent handling
configuration.
RaidType is configuration, not a strategy implementation. Use strategySet() to
create a runtime composite when a caller needs a single RaidStrategy dispatch surface
for the configured strategy list. Use intentHandler(RaidIntent) when processing a
received RaidIntent.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RaidType> static final net.minecraft.resources.ResourceKey<RaidType> static final com.mojang.serialization.Codec<RaidType> static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<RaidType>> static final net.minecraft.resources.ResourceKey<RaidType> -
Constructor Summary
ConstructorsConstructorDescriptionRaidType(RenderOptions renderOptions, org.joml.Vector2f hitbox) RaidType(RenderOptions renderOptions, org.joml.Vector2f hitbox, net.minecraft.core.HolderSet<RaidSpawnSet> eligibleSpawns, net.minecraft.core.HolderSet<RaidAllySet> eligibleAllies, net.minecraft.core.HolderSet<net.minecraft.world.item.Item> adminItems, RaidSpawnStrategy spawnStrategy, BattleStartStrategy battleStartStrategy, List<RaidStrategy> raidStrategies, Map<net.minecraft.resources.ResourceLocation, RaidIntentHandler<?>> intentHandlers) Creates an instance of aRaidTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.HolderSet<net.minecraft.world.item.Item> Returns the value of theadminItemsrecord component.Returns the value of thebattleStartStrategyrecord component.net.minecraft.core.HolderSet<RaidAllySet> Returns the value of theeligibleAlliesrecord component.net.minecraft.core.HolderSet<RaidSpawnSet> Returns the value of theeligibleSpawnsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.joml.Vector2fhitbox()Returns the value of thehitboxrecord component.intentHandler(RaidIntent intent) Gets this raid type's server-side handler for the given intent.Map<net.minecraft.resources.ResourceLocation, RaidIntentHandler<?>> Returns the value of theintentHandlersrecord component.Returns the value of theraidStrategiesrecord component.Returns the value of therenderOptionsrecord component.Returns the value of thespawnStrategyrecord component.Creates a runtime composite for the configured battle-time raid strategies.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
NETWORK_CODEC
-
REGISTRY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<RaidType>> REGISTRY -
DYNAMAX
-
TERA
-
-
Constructor Details
-
RaidType
-
RaidType
public RaidType(RenderOptions renderOptions, org.joml.Vector2f hitbox, net.minecraft.core.HolderSet<RaidSpawnSet> eligibleSpawns, net.minecraft.core.HolderSet<RaidAllySet> eligibleAllies, net.minecraft.core.HolderSet<net.minecraft.world.item.Item> adminItems, RaidSpawnStrategy spawnStrategy, BattleStartStrategy battleStartStrategy, List<RaidStrategy> raidStrategies, Map<net.minecraft.resources.ResourceLocation, RaidIntentHandler<?>> intentHandlers) Creates an instance of aRaidTyperecord class.- Parameters:
renderOptions- the value for therenderOptionsrecord componenthitbox- the value for thehitboxrecord componenteligibleSpawns- the value for theeligibleSpawnsrecord componenteligibleAllies- the value for theeligibleAlliesrecord componentadminItems- the value for theadminItemsrecord componentspawnStrategy- the value for thespawnStrategyrecord componentbattleStartStrategy- the value for thebattleStartStrategyrecord componentraidStrategies- the value for theraidStrategiesrecord componentintentHandlers- the value for theintentHandlersrecord component
-
-
Method Details
-
strategySet
Creates a runtime composite for the configured battle-time raid strategies.- Returns:
- A strategy set that dispatches to this raid type's strategy list in order.
-
intentHandler
Gets this raid type's server-side handler for the given intent.- Parameters:
intent- The received client intent.- Returns:
- The handler for the intent, or null if this raid type does not handle it.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
renderOptions
Returns the value of therenderOptionsrecord component.- Returns:
- the value of the
renderOptionsrecord component
-
hitbox
public org.joml.Vector2f hitbox()Returns the value of thehitboxrecord component.- Returns:
- the value of the
hitboxrecord component
-
eligibleSpawns
Returns the value of theeligibleSpawnsrecord component.- Returns:
- the value of the
eligibleSpawnsrecord component
-
eligibleAllies
Returns the value of theeligibleAlliesrecord component.- Returns:
- the value of the
eligibleAlliesrecord component
-
adminItems
public net.minecraft.core.HolderSet<net.minecraft.world.item.Item> adminItems()Returns the value of theadminItemsrecord component.- Returns:
- the value of the
adminItemsrecord component
-
spawnStrategy
Returns the value of thespawnStrategyrecord component.- Returns:
- the value of the
spawnStrategyrecord component
-
battleStartStrategy
Returns the value of thebattleStartStrategyrecord component.- Returns:
- the value of the
battleStartStrategyrecord component
-
raidStrategies
Returns the value of theraidStrategiesrecord component.- Returns:
- the value of the
raidStrategiesrecord component
-
intentHandlers
Returns the value of theintentHandlersrecord component.- Returns:
- the value of the
intentHandlersrecord component
-