public static class GameRules.BooleanRule extends GameRules.Rule<GameRules.BooleanRule>
Modifier and Type | Field and Description |
---|---|
private boolean |
value |
type
Constructor and Description |
---|
BooleanRule(GameRules.Type<GameRules.BooleanRule> type,
boolean initialValue) |
Modifier and Type | Method and Description |
---|---|
protected GameRules.BooleanRule |
copy() |
private static GameRules.Type<GameRules.BooleanRule> |
create(boolean initialValue) |
private static GameRules.Type<GameRules.BooleanRule> |
create(boolean initialValue,
BiConsumer<MinecraftServer,GameRules.BooleanRule> changeCallback) |
protected void |
deserialize(String value) |
boolean |
get() |
int |
getCommandResult() |
protected GameRules.BooleanRule |
getThis() |
String |
serialize() |
void |
set(boolean value,
MinecraftServer server) |
protected void |
setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context,
String name) |
void |
setValue(GameRules.BooleanRule booleanRule,
MinecraftServer minecraftServer) |
changed, set, toString
public BooleanRule(GameRules.Type<GameRules.BooleanRule> type, boolean initialValue)
private static GameRules.Type<GameRules.BooleanRule> create(boolean initialValue, BiConsumer<MinecraftServer,GameRules.BooleanRule> changeCallback)
private static GameRules.Type<GameRules.BooleanRule> create(boolean initialValue)
protected void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)
setFromArgument
in class GameRules.Rule<GameRules.BooleanRule>
public boolean get()
public void set(boolean value, @Nullable MinecraftServer server)
public String serialize()
serialize
in class GameRules.Rule<GameRules.BooleanRule>
protected void deserialize(String value)
deserialize
in class GameRules.Rule<GameRules.BooleanRule>
public int getCommandResult()
getCommandResult
in class GameRules.Rule<GameRules.BooleanRule>
protected GameRules.BooleanRule getThis()
getThis
in class GameRules.Rule<GameRules.BooleanRule>
protected GameRules.BooleanRule copy()
copy
in class GameRules.Rule<GameRules.BooleanRule>
@Environment(value=CLIENT) public void setValue(GameRules.BooleanRule booleanRule, @Nullable MinecraftServer minecraftServer)
setValue
in class GameRules.Rule<GameRules.BooleanRule>