Package net.minecraft.world.level
Class GameRules.IntegerValue
java.lang.Object
net.minecraft.world.level.GameRules.Value<GameRules.IntegerValue>
net.minecraft.world.level.GameRules.IntegerValue
- Enclosing class:
GameRules
-
Field Summary
FieldsFields inherited from class net.minecraft.world.level.GameRules.Value
type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GameRules.IntegerValuecopy()static GameRules.Type<GameRules.IntegerValue> create(int pDefaultValue) (package private) static GameRules.Type<GameRules.IntegerValue> create(int pDefaultValue, int pMin, int pMax, FeatureFlagSet pRequiredFeatures, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) static GameRules.Type<GameRules.IntegerValue> create(int pDefaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) protected voiddeserialize(String pValue) intget()intprotected GameRules.IntegerValuegetSelf()private static intvoidset(int pValue, MinecraftServer pServer) voidsetFrom(GameRules.IntegerValue pValue, MinecraftServer pServer) booleantryDeserialize(String pName) protected voidupdateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pParamName) Methods inherited from class net.minecraft.world.level.GameRules.Value
onChanged, setFromArgument, toString
-
Field Details
-
value
private int value
-
-
Constructor Details
-
IntegerValue
-
-
Method Details
-
create
public static GameRules.Type<GameRules.IntegerValue> create(int pDefaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) -
create
static GameRules.Type<GameRules.IntegerValue> create(int pDefaultValue, int pMin, int pMax, FeatureFlagSet pRequiredFeatures, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) -
create
-
updateFromArgument
protected void updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, String pParamName) - Specified by:
updateFromArgumentin classGameRules.Value<GameRules.IntegerValue>
-
get
public int get() -
set
-
serialize
- Specified by:
serializein classGameRules.Value<GameRules.IntegerValue>
-
deserialize
- Specified by:
deserializein classGameRules.Value<GameRules.IntegerValue>
-
tryDeserialize
-
safeParse
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResultin classGameRules.Value<GameRules.IntegerValue>
-
getSelf
- Specified by:
getSelfin classGameRules.Value<GameRules.IntegerValue>
-
copy
- Specified by:
copyin classGameRules.Value<GameRules.IntegerValue>
-
setFrom
- Specified by:
setFromin classGameRules.Value<GameRules.IntegerValue>
-