Package net.minecraft.world.rule
Class GameRule<T>
java.lang.Object
net.minecraft.world.rule.GameRule<T>
- All Implemented Interfaces:
ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/world/rule/GameRuleintermediary net/minecraft/class_12279official esr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GameRules.Acceptor<T> private final com.mojang.brigadier.arguments.ArgumentType<T> private final GameRuleCategoryprivate final com.mojang.serialization.Codec<T> private final ToIntFunction<T> private final Tprivate final FeatureSetprivate final GameRuleTypeFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionGameRule(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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(GameRuleVisitor visitor) com.mojang.serialization.DataResult<T> deserialize(String value) com.mojang.brigadier.arguments.ArgumentType<T> com.mojang.serialization.Codec<T> getCodec()intgetCommandResult(T value) getId()getType()getValueName(T value) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
category
- Mappings:
Namespace Name Mixin selector named categoryLnet/minecraft/world/rule/GameRule;category:Lnet/minecraft/world/rule/GameRuleCategory;intermediary field_64167Lnet/minecraft/class_12279;field_64167:Lnet/minecraft/class_5198;official aLesr;a:Less;
-
type
- Mappings:
Namespace Name Mixin selector named typeLnet/minecraft/world/rule/GameRule;type:Lnet/minecraft/world/rule/GameRuleType;intermediary field_64168Lnet/minecraft/class_12279;field_64168:Lnet/minecraft/class_11845;official bLesr;b:Lesu;
-
argumentType
- Mappings:
Namespace Name Mixin selector named argumentTypeLnet/minecraft/world/rule/GameRule;argumentType:Lcom/mojang/brigadier/arguments/ArgumentType;intermediary field_64169Lnet/minecraft/class_12279;field_64169:Lcom/mojang/brigadier/arguments/ArgumentType;official cLesr;c:Lcom/mojang/brigadier/arguments/ArgumentType;
-
acceptor
- Mappings:
Namespace Name Mixin selector named acceptorLnet/minecraft/world/rule/GameRule;acceptor:Lnet/minecraft/world/rule/GameRules$Acceptor;intermediary field_64170Lnet/minecraft/class_12279;field_64170:Lnet/minecraft/class_1928$class_5199;official dLesr;d:Lesw$a;
-
codec
- Mappings:
Namespace Name Mixin selector named codecLnet/minecraft/world/rule/GameRule;codec:Lcom/mojang/serialization/Codec;intermediary field_64171Lnet/minecraft/class_12279;field_64171:Lcom/mojang/serialization/Codec;official eLesr;e:Lcom/mojang/serialization/Codec;
-
commandResultSupplier
- Mappings:
Namespace Name Mixin selector named commandResultSupplierLnet/minecraft/world/rule/GameRule;commandResultSupplier:Ljava/util/function/ToIntFunction;intermediary field_64172Lnet/minecraft/class_12279;field_64172:Ljava/util/function/ToIntFunction;official fLesr;f:Ljava/util/function/ToIntFunction;
-
defaultValue
- Mappings:
Namespace Name Mixin selector named defaultValueLnet/minecraft/world/rule/GameRule;defaultValue:Ljava/lang/Object;intermediary field_64173Lnet/minecraft/class_12279;field_64173:Ljava/lang/Object;official gLesr;g:Ljava/lang/Object;
-
requiredFeatures
- Mappings:
Namespace Name Mixin selector named requiredFeaturesLnet/minecraft/world/rule/GameRule;requiredFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;intermediary field_64174Lnet/minecraft/class_12279;field_64174:Lnet/minecraft/class_7699;official hLesr;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;)Vintermediary <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;)Vofficial <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
-
toShortString
- Mappings:
Namespace Name Mixin selector named toShortStringLnet/minecraft/world/rule/GameRule;toShortString()Ljava/lang/String;intermediary method_76144Lnet/minecraft/class_12279;method_76144()Ljava/lang/String;official aLesr;a()Ljava/lang/String;
-
getId
- Mappings:
Namespace Name Mixin selector named getIdLnet/minecraft/world/rule/GameRule;getId()Lnet/minecraft/util/Identifier;intermediary method_76148Lnet/minecraft/class_12279;method_76148()Lnet/minecraft/class_2960;official bLesr;b()Lamo;
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector named getTranslationKeyLnet/minecraft/world/rule/GameRule;getTranslationKey()Ljava/lang/String;intermediary method_76150Lnet/minecraft/class_12279;method_76150()Ljava/lang/String;official cLesr;c()Ljava/lang/String;
-
getValueName
- Mappings:
Namespace Name Mixin selector named getValueNameLnet/minecraft/world/rule/GameRule;getValueName(Ljava/lang/Object;)Ljava/lang/String;intermediary method_76146Lnet/minecraft/class_12279;method_76146(Ljava/lang/Object;)Ljava/lang/String;official aLesr;a(Ljava/lang/Object;)Ljava/lang/String;
-
deserialize
- Mappings:
Namespace Name Mixin selector named deserializeLnet/minecraft/world/rule/GameRule;deserialize(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;intermediary method_76147Lnet/minecraft/class_12279;method_76147(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;official aLesr;a(Ljava/lang/String;)Lcom/mojang/serialization/DataResult;
-
getValueClass
- Mappings:
Namespace Name Mixin selector named getValueClassLnet/minecraft/world/rule/GameRule;getValueClass()Ljava/lang/Class;intermediary method_76151Lnet/minecraft/class_12279;method_76151()Ljava/lang/Class;official dLesr;d()Ljava/lang/Class;
-
accept
- Mappings:
Namespace Name Mixin selector named acceptLnet/minecraft/world/rule/GameRule;accept(Lnet/minecraft/world/rule/GameRuleVisitor;)Vintermediary method_76145Lnet/minecraft/class_12279;method_76145(Lnet/minecraft/class_4311;)Vofficial aLesr;a(Lesv;)V
-
getCommandResult
- Mappings:
Namespace Name Mixin selector named getCommandResultLnet/minecraft/world/rule/GameRule;getCommandResult(Ljava/lang/Object;)Iintermediary method_76149Lnet/minecraft/class_12279;method_76149(Ljava/lang/Object;)Iofficial bLesr;b(Ljava/lang/Object;)I
-
getCategory
- Mappings:
Namespace Name Mixin selector named getCategoryLnet/minecraft/world/rule/GameRule;getCategory()Lnet/minecraft/world/rule/GameRuleCategory;intermediary method_76152Lnet/minecraft/class_12279;method_76152()Lnet/minecraft/class_5198;official eLesr;e()Less;
-
getType
- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/world/rule/GameRule;getType()Lnet/minecraft/world/rule/GameRuleType;intermediary method_76153Lnet/minecraft/class_12279;method_76153()Lnet/minecraft/class_11845;official fLesr;f()Lesu;
-
getArgumentType
- Mappings:
Namespace Name Mixin selector named getArgumentTypeLnet/minecraft/world/rule/GameRule;getArgumentType()Lcom/mojang/brigadier/arguments/ArgumentType;intermediary method_76154Lnet/minecraft/class_12279;method_76154()Lcom/mojang/brigadier/arguments/ArgumentType;official gLesr;g()Lcom/mojang/brigadier/arguments/ArgumentType;
-
getCodec
- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/world/rule/GameRule;getCodec()Lcom/mojang/serialization/Codec;intermediary method_76155Lnet/minecraft/class_12279;method_76155()Lcom/mojang/serialization/Codec;official hLesr;h()Lcom/mojang/serialization/Codec;
-
getDefaultValue
- Mappings:
Namespace Name Mixin selector named getDefaultValueLnet/minecraft/world/rule/GameRule;getDefaultValue()Ljava/lang/Object;intermediary method_76156Lnet/minecraft/class_12279;method_76156()Ljava/lang/Object;official iLesr;i()Ljava/lang/Object;
-
getRequiredFeatures
- Specified by:
getRequiredFeaturesin interfaceToggleableFeature- Mappings:
Namespace Name Mixin selector named getRequiredFeaturesLnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;intermediary method_45322Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699;official kLdft;k()Ldfw;
-