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.IntegerValue
copy()
static GameRules.Type
<GameRules.IntegerValue> create
(int pDefaultValue) (package private) static GameRules.Type
<GameRules.IntegerValue> create
(int pDefaultValue, int pMin, int pMax, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) static GameRules.Type
<GameRules.IntegerValue> create
(int pDefaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) protected void
deserialize
(String pValue) int
get()
int
protected GameRules.IntegerValue
getSelf()
private static int
void
set
(int pValue, MinecraftServer pServer) void
setFrom
(GameRules.IntegerValue pValue, MinecraftServer pServer) boolean
tryDeserialize
(String pName) protected void
updateFromArgument
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_46304_, String p_46305_) 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, BiConsumer<MinecraftServer, GameRules.IntegerValue> pChangeListener) -
create
-
updateFromArgument
protected void updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_46304_, String p_46305_) - Specified by:
updateFromArgument
in classGameRules.Value<GameRules.IntegerValue>
-
get
public int get() -
set
-
serialize
- Specified by:
serialize
in classGameRules.Value<GameRules.IntegerValue>
-
deserialize
- Specified by:
deserialize
in classGameRules.Value<GameRules.IntegerValue>
-
tryDeserialize
-
safeParse
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResult
in classGameRules.Value<GameRules.IntegerValue>
-
getSelf
- Specified by:
getSelf
in classGameRules.Value<GameRules.IntegerValue>
-
copy
- Specified by:
copy
in classGameRules.Value<GameRules.IntegerValue>
-
setFrom
- Specified by:
setFrom
in classGameRules.Value<GameRules.IntegerValue>
-