net.minecraft.world.level.gamerules

public final class GameRule<T>

implements FeatureElement

etv
net.minecraft.world.level.gamerules.GameRule
net.minecraft.class_12279
net.minecraft.world.rule.GameRule
net.minecraft.src.C_432246_
net.minecraft.world.level.gamerules.GameRule

字段概要

修饰符与类型字段
private final GameRuleCategory
a
category
field_64167
category
f_434316_
private final GameRuleType
b
gameRuleType
field_64168
type
f_436789_
private final com.mojang.brigadier.arguments.ArgumentType<T>
c
argument
field_64169
argumentType
f_434055_
private final GameRules$VisitorCaller<T>
d
visitorCaller
field_64170
acceptor
f_436752_
private final com.mojang.serialization.Codec<T>
e
valueCodec
field_64171
codec
f_435668_
private final ToIntFunction<T>
f
commandResultFunction
field_64172
commandResultSupplier
f_436921_
private final T
g
defaultValue
field_64173
defaultValue
f_434787_
private final FeatureFlagSet
h
requiredFeatures
field_64174
requiredFeatures
f_436983_

构造函数概要

修饰符构造函数
public (GameRuleCategory category, GameRuleType type, com.mojang.brigadier.arguments.ArgumentType<T> argumentType, GameRules$VisitorCaller<T> acceptor, com.mojang.serialization.Codec<T> codec, ToIntFunction<T> commandResultSupplier, T defaultValue, FeatureFlagSet requiredFeatures)

方法概要

修饰符与类型方法
public String
a()
id()
method_76144()
toShortString()
m_447209_()
public Identifier
b()
getIdentifier()
method_76148()
getId()
m_445832_()
public String
c()
getDescriptionId()
method_76150()
getTranslationKey()
m_443093_()
public String
a(T arg0)
serialize(T arg0)
method_76146(T arg0)
getValueName(T value)
m_443804_(T arg0)
public com.mojang.serialization.DataResult<T>
a(String arg0)
deserialize(String arg0)
method_76147(String arg0)
deserialize(String value)
m_439652_(String arg0)
public Class<T>
d()
valueClass()
method_76151()
getValueClass()
m_444488_()
public void
a(etz arg0)
callVisitor(GameRuleTypeVisitor arg0)
method_76145(class_4311 arg0)
accept(GameRuleVisitor visitor)
m_442512_(C_432369_ arg0)
public int
b(T arg0)
getCommandResult(T arg0)
method_76149(T arg0)
getCommandResult(T value)
m_443920_(T arg0)
public GameRuleCategory
e()
category()
method_76152()
getCategory()
m_442107_()
public GameRuleType
f()
gameRuleType()
method_76153()
getType()
m_446715_()
public com.mojang.brigadier.arguments.ArgumentType<T>
g()
argument()
method_76154()
getArgumentType()
m_439065_()
public com.mojang.serialization.Codec<T>
h()
valueCodec()
method_76155()
getCodec()
m_439052_()
public T
i()
defaultValue()
method_76156()
getDefaultValue()
m_443276_()
public FeatureFlagSet
k()
requiredFeatures()
method_45322()
getRequiredFeatures()
m_245183_()