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 defaultValue) (package private) static GameRules.Type
<GameRules.IntegerValue> create
(int defaultValue, int min, int max, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeListener) static GameRules.Type
<GameRules.IntegerValue> create
(int defaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeListener) protected void
deserialize
(String value) int
get()
int
protected GameRules.IntegerValue
getSelf()
private static int
void
set
(int value, MinecraftServer server) void
setFrom
(GameRules.IntegerValue value, MinecraftServer server) boolean
tryDeserialize
(String name) protected void
updateFromArgument
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String paramName) 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 defaultValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeListener) -
create
static GameRules.Type<GameRules.IntegerValue> create(int defaultValue, int min, int max, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeListener) -
create
-
updateFromArgument
protected void updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, String paramName) - 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>
-