Package net.minecraft.world.level
Class GameRules.BooleanValue
java.lang.Object
net.minecraft.world.level.GameRules.Value<GameRules.BooleanValue>
net.minecraft.world.level.GameRules.BooleanValue
- 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.BooleanValue
copy()
static GameRules.Type
<GameRules.BooleanValue> create
(boolean pDefaultValue) static GameRules.Type
<GameRules.BooleanValue> create
(boolean pDefaultValue, BiConsumer<MinecraftServer, GameRules.BooleanValue> pChangeListener) protected void
deserialize
(String pValue) boolean
get()
int
protected GameRules.BooleanValue
getSelf()
void
set
(boolean pValue, MinecraftServer pServer) void
setFrom
(GameRules.BooleanValue pValue, MinecraftServer pServer) protected void
updateFromArgument
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_46231_, String p_46232_) Methods inherited from class net.minecraft.world.level.GameRules.Value
onChanged, setFromArgument, toString
-
Field Details
-
value
private boolean value
-
-
Constructor Details
-
BooleanValue
-
-
Method Details
-
create
public static GameRules.Type<GameRules.BooleanValue> create(boolean pDefaultValue, BiConsumer<MinecraftServer, GameRules.BooleanValue> pChangeListener) -
create
-
updateFromArgument
protected void updateFromArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_46231_, String p_46232_) - Specified by:
updateFromArgument
in classGameRules.Value<GameRules.BooleanValue>
-
get
public boolean get() -
set
-
serialize
- Specified by:
serialize
in classGameRules.Value<GameRules.BooleanValue>
-
deserialize
- Specified by:
deserialize
in classGameRules.Value<GameRules.BooleanValue>
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResult
in classGameRules.Value<GameRules.BooleanValue>
-
getSelf
- Specified by:
getSelf
in classGameRules.Value<GameRules.BooleanValue>
-
copy
- Specified by:
copy
in classGameRules.Value<GameRules.BooleanValue>
-
setFrom
- Specified by:
setFrom
in classGameRules.Value<GameRules.BooleanValue>
-