Class CheckRulesVersionFixed

All Implemented Interfaces:
PixelmonPacket, net.minecraft.network.protocol.common.custom.CustomPacketPayload

public class CheckRulesVersionFixed extends CheckRulesVersion<ShowTeamSelectPacket>
Checks if the client's custom rules are synced with the server's before displaying the fixed rule 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

    Constructors
    Constructor
    Description
    Empty constructor for packet registration.
    Initializes a rules checking packet.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    • CheckRulesVersionFixed

      public CheckRulesVersionFixed()
      Empty constructor for packet registration.
    • CheckRulesVersionFixed

      public CheckRulesVersionFixed(ShowTeamSelectPacket packet)
      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 class CheckRulesVersion<ShowTeamSelectPacket>
      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 class CheckRulesVersion<ShowTeamSelectPacket>
      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 class AbstractPixelmonPacket