Package net.minecraft.world
Class GameRules.BooleanRule
- Enclosing class:
- GameRules
public static class GameRules.BooleanRule extends GameRules.Rule<GameRules.BooleanRule>
-
Field Summary
Fields Modifier and Type Field Description private booleanvalueFields inherited from class net.minecraft.world.GameRules.Rule
type -
Constructor Summary
Constructors Constructor Description BooleanRule(GameRules.Type<GameRules.BooleanRule> type, boolean initialValue) -
Method Summary
Modifier and Type Method Description protected GameRules.BooleanRulecopy()private static GameRules.Type<GameRules.BooleanRule>create(boolean initialValue)private static GameRules.Type<GameRules.BooleanRule>create(boolean initialValue, BiConsumer<MinecraftServer,GameRules.BooleanRule> changeCallback)protected voiddeserialize(String value)booleanget()intgetCommandResult()protected GameRules.BooleanRulegetThis()Stringserialize()voidset(boolean value, MinecraftServer server)protected voidsetFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)voidsetValue(GameRules.BooleanRule booleanRule, MinecraftServer minecraftServer)Methods inherited from class net.minecraft.world.GameRules.Rule
changed, set, toString
-
Field Details
-
value
private boolean value
-
-
Constructor Details
-
BooleanRule
-
-
Method Details
-
create
private static GameRules.Type<GameRules.BooleanRule> create(boolean initialValue, BiConsumer<MinecraftServer,GameRules.BooleanRule> changeCallback) -
create
-
setFromArgument
protected void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)- Specified by:
setFromArgumentin classGameRules.Rule<GameRules.BooleanRule>
-
get
public boolean get() -
set
-
serialize
- Specified by:
serializein classGameRules.Rule<GameRules.BooleanRule>
-
deserialize
- Specified by:
deserializein classGameRules.Rule<GameRules.BooleanRule>
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResultin classGameRules.Rule<GameRules.BooleanRule>
-
getThis
- Specified by:
getThisin classGameRules.Rule<GameRules.BooleanRule>
-
copy
- Specified by:
copyin classGameRules.Rule<GameRules.BooleanRule>
-
setValue
@Environment(CLIENT) public void setValue(GameRules.BooleanRule booleanRule, @Nullable MinecraftServer minecraftServer)- Specified by:
setValuein classGameRules.Rule<GameRules.BooleanRule>
-