Class GameRule<T>

java.lang.Object
net.minecraft.world.rule.GameRule<T>
All Implemented Interfaces:
ToggleableFeature

public final class GameRule<T> extends Object implements ToggleableFeature
Mappings:
Namespace Name
named net/minecraft/world/rule/GameRule
intermediary net/minecraft/class_12279
official esr
  • Field Details

    • category

      private final GameRuleCategory category
      Mappings:
      Namespace Name Mixin selector
      named category Lnet/minecraft/world/rule/GameRule;category:Lnet/minecraft/world/rule/GameRuleCategory;
      intermediary field_64167 Lnet/minecraft/class_12279;field_64167:Lnet/minecraft/class_5198;
      official a Lesr;a:Less;
    • type

      private final GameRuleType type
      Mappings:
      Namespace Name Mixin selector
      named type Lnet/minecraft/world/rule/GameRule;type:Lnet/minecraft/world/rule/GameRuleType;
      intermediary field_64168 Lnet/minecraft/class_12279;field_64168:Lnet/minecraft/class_11845;
      official b Lesr;b:Lesu;
    • argumentType

      private final com.mojang.brigadier.arguments.ArgumentType<T> argumentType
      Mappings:
      Namespace Name Mixin selector
      named argumentType Lnet/minecraft/world/rule/GameRule;argumentType:Lcom/mojang/brigadier/arguments/ArgumentType;
      intermediary field_64169 Lnet/minecraft/class_12279;field_64169:Lcom/mojang/brigadier/arguments/ArgumentType;
      official c Lesr;c:Lcom/mojang/brigadier/arguments/ArgumentType;
    • acceptor

      private final GameRules.Acceptor<T> acceptor
      Mappings:
      Namespace Name Mixin selector
      named acceptor Lnet/minecraft/world/rule/GameRule;acceptor:Lnet/minecraft/world/rule/GameRules$Acceptor;
      intermediary field_64170 Lnet/minecraft/class_12279;field_64170:Lnet/minecraft/class_1928$class_5199;
      official d Lesr;d:Lesw$a;
    • codec

      private final com.mojang.serialization.Codec<T> codec
      Mappings:
      Namespace Name Mixin selector
      named codec Lnet/minecraft/world/rule/GameRule;codec:Lcom/mojang/serialization/Codec;
      intermediary field_64171 Lnet/minecraft/class_12279;field_64171:Lcom/mojang/serialization/Codec;
      official e Lesr;e:Lcom/mojang/serialization/Codec;
    • commandResultSupplier

      private final ToIntFunction<T> commandResultSupplier
      Mappings:
      Namespace Name Mixin selector
      named commandResultSupplier Lnet/minecraft/world/rule/GameRule;commandResultSupplier:Ljava/util/function/ToIntFunction;
      intermediary field_64172 Lnet/minecraft/class_12279;field_64172:Ljava/util/function/ToIntFunction;
      official f Lesr;f:Ljava/util/function/ToIntFunction;
    • defaultValue

      private final T defaultValue
      Mappings:
      Namespace Name Mixin selector
      named defaultValue Lnet/minecraft/world/rule/GameRule;defaultValue:Ljava/lang/Object;
      intermediary field_64173 Lnet/minecraft/class_12279;field_64173:Ljava/lang/Object;
      official g Lesr;g:Ljava/lang/Object;
    • requiredFeatures

      private final FeatureSet requiredFeatures
      Mappings:
      Namespace Name Mixin selector
      named requiredFeatures Lnet/minecraft/world/rule/GameRule;requiredFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary field_64174 Lnet/minecraft/class_12279;field_64174:Lnet/minecraft/class_7699;
      official h Lesr;h:Ldfw;
  • Constructor Details

    • GameRule

      public GameRule(GameRuleCategory category, GameRuleType type, com.mojang.brigadier.arguments.ArgumentType<T> argumentType, GameRules.Acceptor<T> acceptor, com.mojang.serialization.Codec<T> codec, ToIntFunction<T> commandResultSupplier, T defaultValue, FeatureSet requiredFeatures)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/world/rule/GameRule;<init>(Lnet/minecraft/world/rule/GameRuleCategory;Lnet/minecraft/world/rule/GameRuleType;Lcom/mojang/brigadier/arguments/ArgumentType;Lnet/minecraft/world/rule/GameRules$Acceptor;Lcom/mojang/serialization/Codec;Ljava/util/function/ToIntFunction;Ljava/lang/Object;Lnet/minecraft/resource/featuretoggle/FeatureSet;)V
      intermediary <init> Lnet/minecraft/class_12279;<init>(Lnet/minecraft/class_5198;Lnet/minecraft/class_11845;Lcom/mojang/brigadier/arguments/ArgumentType;Lnet/minecraft/class_1928$class_5199;Lcom/mojang/serialization/Codec;Ljava/util/function/ToIntFunction;Ljava/lang/Object;Lnet/minecraft/class_7699;)V
      official <init> Lesr;<init>(Less;Lesu;Lcom/mojang/brigadier/arguments/ArgumentType;Lesw$a;Lcom/mojang/serialization/Codec;Ljava/util/function/ToIntFunction;Ljava/lang/Object;Ldfw;)V
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toShortString

      public String toShortString()
      Mappings:
      Namespace Name Mixin selector
      named toShortString Lnet/minecraft/world/rule/GameRule;toShortString()Ljava/lang/String;
      intermediary method_76144 Lnet/minecraft/class_12279;method_76144()Ljava/lang/String;
      official a Lesr;a()Ljava/lang/String;
    • getId

      public Identifier getId()
      Mappings:
      Namespace Name Mixin selector
      named getId Lnet/minecraft/world/rule/GameRule;getId()Lnet/minecraft/util/Identifier;
      intermediary method_76148 Lnet/minecraft/class_12279;method_76148()Lnet/minecraft/class_2960;
      official b Lesr;b()Lamo;
    • getTranslationKey

      public String getTranslationKey()
      Mappings:
      Namespace Name Mixin selector
      named getTranslationKey Lnet/minecraft/world/rule/GameRule;getTranslationKey()Ljava/lang/String;
      intermediary method_76150 Lnet/minecraft/class_12279;method_76150()Ljava/lang/String;
      official c Lesr;c()Ljava/lang/String;
    • getValueName

      public String getValueName(T value)
      Mappings:
      Namespace Name Mixin selector
      named getValueName Lnet/minecraft/world/rule/GameRule;getValueName(Ljava/lang/Object;)Ljava/lang/String;
      intermediary method_76146 Lnet/minecraft/class_12279;method_76146(Ljava/lang/Object;)Ljava/lang/String;
      official a Lesr;a(Ljava/lang/Object;)Ljava/lang/String;
    • deserialize

      public com.mojang.serialization.DataResult<T> deserialize(String value)
      Mappings:
      Namespace Name Mixin selector
      named deserialize Lnet/minecraft/world/rule/GameRule;deserialize(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      intermediary method_76147 Lnet/minecraft/class_12279;method_76147(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
      official a Lesr;a(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
    • getValueClass

      public Class<T> getValueClass()
      Mappings:
      Namespace Name Mixin selector
      named getValueClass Lnet/minecraft/world/rule/GameRule;getValueClass()Ljava/lang/Class;
      intermediary method_76151 Lnet/minecraft/class_12279;method_76151()Ljava/lang/Class;
      official d Lesr;d()Ljava/lang/Class;
    • accept

      public void accept(GameRuleVisitor visitor)
      Mappings:
      Namespace Name Mixin selector
      named accept Lnet/minecraft/world/rule/GameRule;accept(Lnet/minecraft/world/rule/GameRuleVisitor;)V
      intermediary method_76145 Lnet/minecraft/class_12279;method_76145(Lnet/minecraft/class_4311;)V
      official a Lesr;a(Lesv;)V
    • getCommandResult

      public int getCommandResult(T value)
      Mappings:
      Namespace Name Mixin selector
      named getCommandResult Lnet/minecraft/world/rule/GameRule;getCommandResult(Ljava/lang/Object;)I
      intermediary method_76149 Lnet/minecraft/class_12279;method_76149(Ljava/lang/Object;)I
      official b Lesr;b(Ljava/lang/Object;)I
    • getCategory

      public GameRuleCategory getCategory()
      Mappings:
      Namespace Name Mixin selector
      named getCategory Lnet/minecraft/world/rule/GameRule;getCategory()Lnet/minecraft/world/rule/GameRuleCategory;
      intermediary method_76152 Lnet/minecraft/class_12279;method_76152()Lnet/minecraft/class_5198;
      official e Lesr;e()Less;
    • getType

      public GameRuleType getType()
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/world/rule/GameRule;getType()Lnet/minecraft/world/rule/GameRuleType;
      intermediary method_76153 Lnet/minecraft/class_12279;method_76153()Lnet/minecraft/class_11845;
      official f Lesr;f()Lesu;
    • getArgumentType

      public com.mojang.brigadier.arguments.ArgumentType<T> getArgumentType()
      Mappings:
      Namespace Name Mixin selector
      named getArgumentType Lnet/minecraft/world/rule/GameRule;getArgumentType()Lcom/mojang/brigadier/arguments/ArgumentType;
      intermediary method_76154 Lnet/minecraft/class_12279;method_76154()Lcom/mojang/brigadier/arguments/ArgumentType;
      official g Lesr;g()Lcom/mojang/brigadier/arguments/ArgumentType;
    • getCodec

      public com.mojang.serialization.Codec<T> getCodec()
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/world/rule/GameRule;getCodec()Lcom/mojang/serialization/Codec;
      intermediary method_76155 Lnet/minecraft/class_12279;method_76155()Lcom/mojang/serialization/Codec;
      official h Lesr;h()Lcom/mojang/serialization/Codec;
    • getDefaultValue

      public T getDefaultValue()
      Mappings:
      Namespace Name Mixin selector
      named getDefaultValue Lnet/minecraft/world/rule/GameRule;getDefaultValue()Ljava/lang/Object;
      intermediary method_76156 Lnet/minecraft/class_12279;method_76156()Ljava/lang/Object;
      official i Lesr;i()Ljava/lang/Object;
    • getRequiredFeatures

      public FeatureSet getRequiredFeatures()
      Specified by:
      getRequiredFeatures in interface ToggleableFeature
      Mappings:
      Namespace Name Mixin selector
      named getRequiredFeatures Lnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary method_45322 Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699;
      official k Ldft;k()Ldfw;