Class CheckRulesVersionChoosePacket
java.lang.Object
com.pixelmonmod.pixelmon.comm.data.AbstractPixelmonPacket
com.pixelmonmod.pixelmon.comm.packetHandlers.battles.rules.CheckRulesVersion<DisplayBattleQueryRulesPacket>
com.pixelmonmod.pixelmon.comm.packetHandlers.battles.rules.CheckRulesVersionChoosePacket
- All Implemented Interfaces:
PixelmonPacket
,net.minecraft.network.protocol.common.custom.CustomPacketPayload
Checks if the client's custom rules are synced with the server's before displaying the rule selection screen.
-
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> -
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.comm.packetHandlers.battles.rules.CheckRulesVersion
packet
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for packet registration.Initializes a rules checking packet. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handlePacket
(net.neoforged.neoforge.network.handling.IPayloadContext context) void
processPacket
(net.neoforged.neoforge.network.handling.IPayloadContext context) Acts upon the inner packet when rules have been synced.protected void
readPacket
(net.minecraft.network.RegistryFriendlyByteBuf buf) Reads back the contained packet from buffer data.Methods inherited from class com.pixelmonmod.pixelmon.comm.packetHandlers.battles.rules.CheckRulesVersion
decode, encode, onMessage
Methods inherited from class com.pixelmonmod.pixelmon.comm.data.AbstractPixelmonPacket
handle, reply
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
Methods inherited from interface com.pixelmonmod.pixelmon.comm.data.PixelmonPacket
decode, encode, type
-
Constructor Details
-
CheckRulesVersionChoosePacket
public CheckRulesVersionChoosePacket()Empty constructor for packet registration. -
CheckRulesVersionChoosePacket
Initializes a rules checking packet.- Parameters:
packet
- The packet that will be processed once rules are synced.
-
-
Method Details
-
readPacket
protected void readPacket(net.minecraft.network.RegistryFriendlyByteBuf buf) Description copied from class:CheckRulesVersion
Reads back the contained packet from buffer data.- Specified by:
readPacket
in classCheckRulesVersion<DisplayBattleQueryRulesPacket>
- Parameters:
buf
- The buffer to read data from.
-
processPacket
public void processPacket(net.neoforged.neoforge.network.handling.IPayloadContext context) Description copied from class:CheckRulesVersion
Acts upon the inner packet when rules have been synced.- Specified by:
processPacket
in classCheckRulesVersion<DisplayBattleQueryRulesPacket>
- Parameters:
context
- The context that the packet was sent from.
-
handlePacket
protected void handlePacket(net.neoforged.neoforge.network.handling.IPayloadContext context) - Specified by:
handlePacket
in classAbstractPixelmonPacket
-