public static class GameRules.IntRule extends GameRules.Rule<GameRules.IntRule>
Modifier and Type | Field and Description |
---|---|
private int |
value |
type
Constructor and Description |
---|
IntRule(GameRules.Type<GameRules.IntRule> rule,
int initialValue) |
Modifier and Type | Method and Description |
---|---|
protected GameRules.IntRule |
copy() |
private static GameRules.Type<GameRules.IntRule> |
create(int initialValue) |
private static GameRules.Type<GameRules.IntRule> |
create(int initialValue,
BiConsumer<MinecraftServer,GameRules.IntRule> changeCallback) |
protected void |
deserialize(String value) |
int |
get() |
int |
getCommandResult() |
protected GameRules.IntRule |
getThis() |
private static int |
parseInt(String input) |
String |
serialize() |
protected void |
setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
void |
setValue(GameRules.IntRule intRule,
MinecraftServer minecraftServer) |
boolean |
validate(String input)
Validates that an input is valid for this rule.
|
changed, set, toString
public IntRule(GameRules.Type<GameRules.IntRule> rule, int initialValue)
private static GameRules.Type<GameRules.IntRule> create(int initialValue, BiConsumer<MinecraftServer,GameRules.IntRule> changeCallback)
private static GameRules.Type<GameRules.IntRule> create(int initialValue)
protected void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
setFromArgument
in class GameRules.Rule<GameRules.IntRule>
public int get()
public String serialize()
serialize
in class GameRules.Rule<GameRules.IntRule>
protected void deserialize(String value)
deserialize
in class GameRules.Rule<GameRules.IntRule>
@Environment(value=CLIENT) public boolean validate(String input)
private static int parseInt(String input)
public int getCommandResult()
getCommandResult
in class GameRules.Rule<GameRules.IntRule>
protected GameRules.IntRule getThis()
getThis
in class GameRules.Rule<GameRules.IntRule>
protected GameRules.IntRule copy()
copy
in class GameRules.Rule<GameRules.IntRule>
@Environment(value=CLIENT) public void setValue(GameRules.IntRule intRule, @Nullable MinecraftServer minecraftServer)
setValue
in class GameRules.Rule<GameRules.IntRule>