Interface RaidIntent
- All Known Implementing Classes:
CatchRaidIntent,MultiplayerRaidIntent,QuitRaidIntent,SelectedPokemonRaidIntent,StartMultiplayerRaidIntent,StartSoloRaidIntent
public interface RaidIntent
A client-originated raid request sent to the server through
RaidIntentPacket.
Intents are transport data only. They describe what the player is asking to do, such as
selecting a party member, starting a raid, or attempting a catch. Server behavior is supplied by
the active raid's RaidIntentHandler, normally chosen from RaidData's
RaidType.
This split lets raid types replace or omit handling for a standard intent without changing the packet format that clients send.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, RaidIntent> -
Method Summary
Modifier and TypeMethodDescriptionstatic RaidIntentdecode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Decodes a raid intent from the network buffer.default voidencode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Encodes this raid intent to the network buffer.default net.minecraft.resources.ResourceLocationid()Gets this intent's registered id.default net.minecraft.resources.ResourceKey<RaidIntentType<?>> Gets this intent's registry key.RaidIntentType<? extends RaidIntent> type()Gets the registered type used to encode, decode, and route this intent.
-
Field Details
-
CODEC
static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,RaidIntent> CODEC
-
-
Method Details
-
type
RaidIntentType<? extends RaidIntent> type()Gets the registered type used to encode, decode, and route this intent.- Returns:
- The intent type.
-
decode
Decodes a raid intent from the network buffer.- Parameters:
buffer- The buffer to read from.- Returns:
- The decoded intent.
-
encode
default void encode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Encodes this raid intent to the network buffer.- Parameters:
buffer- The buffer to write to.
-
registryKey
Gets this intent's registry key.- Returns:
- The registry key for
type().
-
id
default net.minecraft.resources.ResourceLocation id()Gets this intent's registered id.- Returns:
- The registry id for
type().
-