net.minecraft.world.rule

public final class GameRule<T>

implements ToggleableFeature

net.minecraft.world.level.gamerules.GameRule
net.minecraft.class_12279
net.minecraft.world.rule.GameRule

Field summary

Modifier and TypeField
private final GameRuleCategory
category
field_64167
category
private final GameRuleType
gameRuleType
field_64168
type
private final com.mojang.brigadier.arguments.ArgumentType<T>
argument
field_64169
argumentType
private final GameRules$Acceptor<T>
visitorCaller
field_64170
acceptor
private final com.mojang.serialization.Codec<T>
valueCodec
field_64171
codec
private final ToIntFunction<T>
commandResultFunction
field_64172
commandResultSupplier
private final T
defaultValue
field_64173
defaultValue
private final FeatureSet
requiredFeatures
field_64174
requiredFeatures

Constructor summary

ModifierConstructor
public (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 TypeMethod
public String
id()
method_76144()
toShortString()
public Identifier
getIdentifier()
method_76148()
getId()
public Identifier
getIdentifierWithFallback()
method_1_2505()
getIdOrFallback()
public String
getDescriptionId()
method_76150()
getTranslationKey()
public String
serialize(T value)
method_76146(T arg0)
getValueName(T value)
public com.mojang.serialization.DataResult<T>
deserialize(String value)
method_76147(String arg0)
deserialize(String value)
public Class<T>
valueClass()
method_76151()
getValueClass()
public void
callVisitor(GameRuleTypeVisitor visitor)
method_76145(class_4311 arg0)
accept(GameRuleVisitor visitor)
public int
getCommandResult(T value)
method_76149(T arg0)
getCommandResult(T value)
public GameRuleCategory
category()
method_76152()
getCategory()
public GameRuleType
gameRuleType()
method_76153()
getType()
public com.mojang.brigadier.arguments.ArgumentType<T>
argument()
method_76154()
getArgumentType()
public com.mojang.serialization.Codec<T>
valueCodec()
method_76155()
getCodec()
public T
defaultValue()
method_76156()
getDefaultValue()
public FeatureSet
requiredFeatures()
method_45322()
getRequiredFeatures()
private static String
lambda$deserialize$1()
method_76158()
method_76158()
private static String
lambda$deserialize$0()
method_76159()
method_76159()