Package net.minecraft.world
Class GameRules.IntegerValue
- java.lang.Object
-
- net.minecraft.world.GameRules.RuleValue<GameRules.IntegerValue>
-
- net.minecraft.world.GameRules.IntegerValue
-
- Enclosing class:
- GameRules
public static class GameRules.IntegerValue extends GameRules.RuleValue<GameRules.IntegerValue>
-
-
Field Summary
Fields Modifier and Type Field Description private int
value
-
Fields inherited from class net.minecraft.world.GameRules.RuleValue
type
-
-
Constructor Summary
Constructors Constructor Description IntegerValue(GameRules.RuleType<GameRules.IntegerValue> p_i51534_1_, int p_i51534_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected GameRules.IntegerValue
copy()
private static GameRules.RuleType<GameRules.IntegerValue>
create(int p_223559_0_)
private static GameRules.RuleType<GameRules.IntegerValue>
create(int p_223564_0_, java.util.function.BiConsumer<MinecraftServer,GameRules.IntegerValue> p_223564_1_)
protected void
deserialize(java.lang.String p_223553_1_)
int
get()
int
getCommandResult()
protected GameRules.IntegerValue
getSelf()
private static int
safeParse(java.lang.String p_223563_0_)
java.lang.String
serialize()
void
setFrom(GameRules.IntegerValue p_230313_1_, MinecraftServer p_230313_2_)
boolean
tryDeserialize(java.lang.String p_234909_1_)
protected void
updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSource> p_223555_1_, java.lang.String p_223555_2_)
-
Methods inherited from class net.minecraft.world.GameRules.RuleValue
onChanged, setFromArgument, toString
-
-
-
-
Constructor Detail
-
IntegerValue
public IntegerValue(GameRules.RuleType<GameRules.IntegerValue> p_i51534_1_, int p_i51534_2_)
-
-
Method Detail
-
create
private static GameRules.RuleType<GameRules.IntegerValue> create(int p_223564_0_, java.util.function.BiConsumer<MinecraftServer,GameRules.IntegerValue> p_223564_1_)
-
create
private static GameRules.RuleType<GameRules.IntegerValue> create(int p_223559_0_)
-
updateFromArgument
protected void updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSource> p_223555_1_, java.lang.String p_223555_2_)
- Specified by:
updateFromArgument
in classGameRules.RuleValue<GameRules.IntegerValue>
-
get
public int get()
-
serialize
public java.lang.String serialize()
- Specified by:
serialize
in classGameRules.RuleValue<GameRules.IntegerValue>
-
deserialize
protected void deserialize(java.lang.String p_223553_1_)
- Specified by:
deserialize
in classGameRules.RuleValue<GameRules.IntegerValue>
-
tryDeserialize
public boolean tryDeserialize(java.lang.String p_234909_1_)
-
safeParse
private static int safeParse(java.lang.String p_223563_0_)
-
getCommandResult
public int getCommandResult()
- Specified by:
getCommandResult
in classGameRules.RuleValue<GameRules.IntegerValue>
-
getSelf
protected GameRules.IntegerValue getSelf()
- Specified by:
getSelf
in classGameRules.RuleValue<GameRules.IntegerValue>
-
copy
protected GameRules.IntegerValue copy()
- Specified by:
copy
in classGameRules.RuleValue<GameRules.IntegerValue>
-
setFrom
public void setFrom(GameRules.IntegerValue p_230313_1_, @Nullable MinecraftServer p_230313_2_)
- Specified by:
setFrom
in classGameRules.RuleValue<GameRules.IntegerValue>
-
-