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 FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionGameRule(GameRuleCategory category, GameRuleType gameRuleType, com.mojang.brigadier.arguments.ArgumentType<T> argument, GameRules.VisitorCaller<T> visitorCaller, com.mojang.serialization.Codec<T> valueCodec, ToIntFunction<T> commandResultFunction, T defaultValue, FeatureFlagSet requiredFeatures) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.arguments.ArgumentType<T> argument()voidcallVisitor(GameRuleTypeVisitor visitor) category()com.mojang.serialization.DataResult<T> deserialize(String value) intgetCommandResult(T value) id()toString()com.mojang.serialization.Codec<T> Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FeatureElement
isEnabled
-
Field Details
-
category
-
gameRuleType
-
argument
-
visitorCaller
-
valueCodec
-
commandResultFunction
-
defaultValue
-
requiredFeatures
-
-
Constructor Details
-
GameRule
public GameRule(GameRuleCategory category, GameRuleType gameRuleType, com.mojang.brigadier.arguments.ArgumentType<T> argument, GameRules.VisitorCaller<T> visitorCaller, com.mojang.serialization.Codec<T> valueCodec, ToIntFunction<T> commandResultFunction, T defaultValue, FeatureFlagSet requiredFeatures)
-
-
Method Details
-
toString
-
id
-
getIdentifier
-
getDescriptionId
-
serialize
-
deserialize
-
valueClass
-
callVisitor
-
getCommandResult
-
category
-
gameRuleType
-
argument
-
valueCodec
-
defaultValue
-
requiredFeatures
- Specified by:
requiredFeaturesin interfaceFeatureElement
-