Class GameRule<T>
java.lang.Object
net.minecraft.world.level.gamerules.GameRule<T>
- All Implemented Interfaces:
FeatureElement
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.brigadier.arguments.ArgumentType<T> private final GameRuleCategoryprivate final ToIntFunction<T> private final Tprivate final GameRuleTypeprivate final FeatureFlagSetprivate final com.mojang.serialization.Codec<T> private final GameRules.VisitorCaller<T> Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionGameRule(GameRuleCategory pCategory, GameRuleType pGameRuleType, com.mojang.brigadier.arguments.ArgumentType<T> pArgument, GameRules.VisitorCaller<T> pVisitorCaller, com.mojang.serialization.Codec<T> pValueCodec, ToIntFunction<T> pCommandResultFunction, T pDefaultValue, FeatureFlagSet pRequiredFeatures) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.arguments.ArgumentType<T> argument()voidcallVisitor(GameRuleTypeVisitor pVisitor) category()com.mojang.serialization.DataResult<T> deserialize(String pValue) intgetCommandResult(T pValue) id()toString()com.mojang.serialization.Codec<T> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
-
Field Details
-
category
-
gameRuleType
-
argument
-
visitorCaller
-
valueCodec
-
commandResultFunction
-
defaultValue
-
requiredFeatures
-
-
Constructor Details
-
GameRule
public GameRule(GameRuleCategory pCategory, GameRuleType pGameRuleType, com.mojang.brigadier.arguments.ArgumentType<T> pArgument, GameRules.VisitorCaller<T> pVisitorCaller, com.mojang.serialization.Codec<T> pValueCodec, ToIntFunction<T> pCommandResultFunction, T pDefaultValue, FeatureFlagSet pRequiredFeatures)
-
-
Method Details
-
toString
-
id
-
getIdentifier
-
getDescriptionId
-
serialize
-
deserialize
-
valueClass
-
callVisitor
-
getCommandResult
-
category
-
gameRuleType
-
argument
-
valueCodec
-
defaultValue
-
requiredFeatures
- Specified by:
requiredFeaturesin interfaceFeatureElement
-