Package net.minecraft.world
Class GameRules.IntRule
- Enclosing class:
- GameRules
public static class GameRules.IntRule extends GameRules.Rule<GameRules.IntRule>
-
Field Summary
Fields Modifier and Type Field Description private intvalueFields inherited from class net.minecraft.world.GameRules.Rule
type -
Constructor Summary
Constructors Constructor Description IntRule(GameRules.Type<GameRules.IntRule> rule, int initialValue) -
Method Summary
Modifier and Type Method Description protected GameRules.IntRulecopy()private static GameRules.Type<GameRules.IntRule>create(int initialValue)private static GameRules.Type<GameRules.IntRule>create(int initialValue, BiConsumer<MinecraftServer,GameRules.IntRule> changeCallback)protected voiddeserialize(String value)intget()intgetCommandResult()protected GameRules.IntRulegetThis()private static intparseInt(String input)Stringserialize()protected voidsetFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)voidsetValue(GameRules.IntRule intRule, MinecraftServer minecraftServer)booleanvalidate(String input)Validates that an input is valid for this rule.Methods inherited from class net.minecraft.world.GameRules.Rule
changed, set, toString
-
Field Details
-
value
private int value
-
-
Constructor Details
-
IntRule
-
-
Method Details
-
create
private static GameRules.Type<GameRules.IntRule> create(int initialValue, BiConsumer<MinecraftServer,GameRules.IntRule> changeCallback) -
create
-
setFromArgument
protected void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name)- Specified by:
setFromArgumentin classGameRules.Rule<GameRules.IntRule>
-
get
public int get() -
serialize
- Specified by:
serializein classGameRules.Rule<GameRules.IntRule>
-
deserialize
- Specified by:
deserializein classGameRules.Rule<GameRules.IntRule>
-
validate
Validates that an input is valid for this rule. -
parseInt
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResultin classGameRules.Rule<GameRules.IntRule>
-
getThis
- Specified by:
getThisin classGameRules.Rule<GameRules.IntRule>
-
copy
- Specified by:
copyin classGameRules.Rule<GameRules.IntRule>
-
setValue
@Environment(CLIENT) public void setValue(GameRules.IntRule intRule, @Nullable MinecraftServer minecraftServer)- Specified by:
setValuein classGameRules.Rule<GameRules.IntRule>
-