Record Class CheckFeatureFlags

java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.configuration.CheckFeatureFlags
All Implemented Interfaces:
net.minecraft.server.network.ConfigurationTask

@Internal public record CheckFeatureFlags(net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener) extends Record implements net.minecraft.server.network.ConfigurationTask
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.network.ConfigurationTask

    net.minecraft.server.network.ConfigurationTask.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener
    The field for the listener record component.
    private static final org.slf4j.Logger
     
    private static Set<net.minecraft.resources.ResourceLocation>
     
    static final net.minecraft.server.network.ConfigurationTask.Type
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    CheckFeatureFlags(net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener)
    Creates an instance of a CheckFeatureFlags record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    private static Set<net.minecraft.resources.ResourceLocation>
     
    static void
     
    static void
     
    static boolean
    handleVanillaServerConnection(net.minecraft.network.protocol.configuration.ClientConfigurationPacketListener listener)
     
    final int
    Returns a hash code value for this object.
    net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener
    Returns the value of the listener record component.
    void
    start(Consumer<net.minecraft.network.protocol.Packet<?>> packetSender)
     
    final String
    Returns a string representation of this record class.
    net.minecraft.server.network.ConfigurationTask.Type
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • listener

      private final net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener
      The field for the listener record component.
    • TYPE

      public static final net.minecraft.server.network.ConfigurationTask.Type TYPE
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • moddedFlags

      private static Set<net.minecraft.resources.ResourceLocation> moddedFlags
  • Constructor Details

    • CheckFeatureFlags

      public CheckFeatureFlags(net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener)
      Creates an instance of a CheckFeatureFlags record class.
      Parameters:
      listener - the value for the listener record component
  • Method Details

    • start

      public void start(Consumer<net.minecraft.network.protocol.Packet<?>> packetSender)
      Specified by:
      start in interface net.minecraft.server.network.ConfigurationTask
    • handleClientboundPayload

      public static void handleClientboundPayload(FeatureFlagDataPayload payload, IPayloadContext context)
    • handleServerboundPayload

      public static void handleServerboundPayload(FeatureFlagAcknowledgePayload payload, IPayloadContext context)
    • handleVanillaServerConnection

      public static boolean handleVanillaServerConnection(net.minecraft.network.protocol.configuration.ClientConfigurationPacketListener listener)
    • getModdedFeatureFlags

      private static Set<net.minecraft.resources.ResourceLocation> getModdedFeatureFlags()
    • type

      public net.minecraft.server.network.ConfigurationTask.Type type()
      Specified by:
      type in interface net.minecraft.server.network.ConfigurationTask
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • listener

      public net.minecraft.network.protocol.configuration.ServerConfigurationPacketListener listener()
      Returns the value of the listener record component.
      Returns:
      the value of the listener record component