Class CatchRaidIntentHandler
java.lang.Object
com.pixelmonmod.pixelmon.battles.raids.data.update.handler.CatchRaidIntentHandler
- All Implemented Interfaces:
RaidIntentHandler<CatchRaidIntent>
Standard handler for
CatchRaidIntent.
Validates the selected Poke Ball, runs raid capture logic, consumes the ball when appropriate, and sends the catch result back to the player.
-
Field Summary
FieldsFields inherited from interface com.pixelmonmod.pixelmon.battles.raids.data.update.RaidIntentHandler
CODEC, REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(net.minecraft.server.level.ServerPlayer sender, RaidData data, CatchRaidIntent intent) Applies the typed intent to the given raid.Gets the concrete intent class this handler supports.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.battles.raids.data.update.RaidIntentHandler
execute
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
CatchRaidIntentHandler
public CatchRaidIntentHandler()
-
-
Method Details
-
getIntentClass
Description copied from interface:RaidIntentHandlerGets the concrete intent class this handler supports.- Specified by:
getIntentClassin interfaceRaidIntentHandler<CatchRaidIntent>- Returns:
- The accepted intent class.
-
apply
public void apply(net.minecraft.server.level.ServerPlayer sender, RaidData data, CatchRaidIntent intent) Description copied from interface:RaidIntentHandlerApplies the typed intent to the given raid.- Specified by:
applyin interfaceRaidIntentHandler<CatchRaidIntent>- Parameters:
sender- The player who sent the intent.data- The raid data receiving the intent.intent- The typed intent to process.
-