Class BackToMainMenuPacket
java.lang.Object
com.pixelmonmod.pixelmon.comm.data.AbstractPixelmonPacket
com.pixelmonmod.pixelmon.battles.tasks.BattleTaskPacket
com.pixelmonmod.pixelmon.comm.packetHandlers.battles.BackToMainMenuPacket
- All Implemented Interfaces:
PixelmonPacket,net.minecraft.network.protocol.common.custom.CustomPacketPayload
Opens the move-select UI for the next turn. Sequential so it queues
behind pending messages and animation gates, otherwise the player can
pick a move before seeing the previous turn finish (e.g. opponent's
switch).
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Constructor Summary
ConstructorsConstructorDescriptionBackToMainMenuPacket(List<Boolean> canSwitch, boolean canFlee, List<UUID> pokemonToChoose) -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Decodes the information from the buffer to the packet instancevoidencode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Encodes the buffer with the packet informationGets the UUID of thePokemonthis message affectsbooleanWill be called once per frame until you return false.booleanIf this returns true the gui will not wait to complete this task before running the next task in queue.Methods inherited from class com.pixelmonmod.pixelmon.battles.tasks.BattleTaskPacket
handlePacketMethods inherited from class com.pixelmonmod.pixelmon.comm.data.AbstractPixelmonPacket
handle, replyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerboundMethods inherited from interface com.pixelmonmod.pixelmon.comm.data.PixelmonPacket
decode, encode, type
-
Constructor Details
-
BackToMainMenuPacket
public BackToMainMenuPacket() -
BackToMainMenuPacket
-
-
Method Details
-
decode
public void decode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Description copied from interface:PixelmonPacketDecodes the information from the buffer to the packet instance- Specified by:
decodein interfacePixelmonPacket- Overrides:
decodein classAbstractPixelmonPacket- Parameters:
buffer- The buffer being decoded
-
encode
public void encode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Description copied from interface:PixelmonPacketEncodes the buffer with the packet information- Specified by:
encodein interfacePixelmonPacket- Overrides:
encodein classAbstractPixelmonPacket- Parameters:
buffer- The buffer being encoded
-
getPokemonID
Description copied from class:BattleTaskPacketGets the UUID of thePokemonthis message affects- Specified by:
getPokemonIDin classBattleTaskPacket- Returns:
- the uuid of the pokemon this message affects, or null.
-
shouldRunParallel
public boolean shouldRunParallel()Description copied from class:BattleTaskPacketIf this returns true the gui will not wait to complete this task before running the next task in queue. This task will not run at the same time as another parallel task with the same pokemonID- Overrides:
shouldRunParallelin classBattleTaskPacket- Returns:
- if the task should run parallel
-
process
Description copied from class:BattleTaskPacketWill be called once per frame until you return false.- Specified by:
processin classBattleTaskPacket- Returns:
- true if you should continue being updated. false otherwise.
-