Record Class GameRuleRpcDispatcher.RuleEntry<T>

java.lang.Object
java.lang.Record
net.minecraft.server.dedicated.management.dispatch.GameRuleRpcDispatcher.RuleEntry<T>
Record Components:
gameRule -
value -
Enclosing class:
GameRuleRpcDispatcher

public static record GameRuleRpcDispatcher.RuleEntry<T>(GameRule<T> gameRule, T value) extends Record
Mappings:
Namespace Name
named net/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry
intermediary net/minecraft/class_11844$class_12254
official avk$a
named gameRule
intermediary comp_5161
official c
named value
intermediary comp_5162
official d
  • Field Details

    • gameRule

      private final GameRule<T> gameRule
      The field for the gameRule record component.
    • value

      private final T value
      The field for the value record component.
    • TYPED_CODEC

      public static final com.mojang.serialization.Codec<GameRuleRpcDispatcher.RuleEntry<?>> TYPED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named TYPED_CODEC Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;TYPED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_64088 Lnet/minecraft/class_11844$class_12254;field_64088:Lcom/mojang/serialization/Codec;
      official a Lavk$a;a:Lcom/mojang/serialization/Codec;
    • UNTYPED_CODEC

      public static final com.mojang.serialization.Codec<GameRuleRpcDispatcher.RuleEntry<?>> UNTYPED_CODEC
      Mappings:
      Namespace Name Mixin selector
      named UNTYPED_CODEC Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;UNTYPED_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_64089 Lnet/minecraft/class_11844$class_12254;field_64089:Lcom/mojang/serialization/Codec;
      official b Lavk$a;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • RuleEntry

      public RuleEntry(GameRule<T> gameRule, T value)
      Creates an instance of a RuleEntry record class.
      Parameters:
      gameRule - the value for the gameRule record component
      value - the value for the value record component
  • Method Details

    • untypedCodec

      private static <T> com.mojang.serialization.MapCodec<? extends GameRuleRpcDispatcher.RuleEntry<T>> untypedCodec(GameRule<T> rule)
      Mappings:
      Namespace Name Mixin selector
      named untypedCodec Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;untypedCodec(Lnet/minecraft/world/rule/GameRule;)Lcom/mojang/serialization/MapCodec;
      intermediary method_76050 Lnet/minecraft/class_11844$class_12254;method_76050(Lnet/minecraft/class_12279;)Lcom/mojang/serialization/MapCodec;
      official a Lavk$a;a(Lesn;)Lcom/mojang/serialization/MapCodec;
    • typedCodec

      private static <T> com.mojang.serialization.MapCodec<? extends GameRuleRpcDispatcher.RuleEntry<T>> typedCodec(GameRule<T> rule)
      Mappings:
      Namespace Name Mixin selector
      named typedCodec Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;typedCodec(Lnet/minecraft/world/rule/GameRule;)Lcom/mojang/serialization/MapCodec;
      intermediary method_76054 Lnet/minecraft/class_11844$class_12254;method_76054(Lnet/minecraft/class_12279;)Lcom/mojang/serialization/MapCodec;
      official b Lavk$a;b(Lesn;)Lcom/mojang/serialization/MapCodec;
    • validateType

      private static <T> GameRuleRpcDispatcher.RuleEntry<T> validateType(GameRule<T> rule, GameRuleType type, T value)
      Mappings:
      Namespace Name Mixin selector
      named validateType Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;validateType(Lnet/minecraft/world/rule/GameRule;Lnet/minecraft/world/rule/GameRuleType;Ljava/lang/Object;)Lnet/minecraft/server/dedicated/management/dispatch/GameRuleRpcDispatcher$RuleEntry;
      intermediary method_76052 Lnet/minecraft/class_11844$class_12254;method_76052(Lnet/minecraft/class_12279;Lnet/minecraft/class_11845;Ljava/lang/Object;)Lnet/minecraft/class_11844$class_12254;
      official a Lavk$a;a(Lesn;Lesq;Ljava/lang/Object;)Lavk$a;
    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • gameRule

      public GameRule<T> gameRule()
      Returns the value of the gameRule record component.
      Returns:
      the value of the gameRule record component
    • value

      public T value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component