Class DoubleRule
- All Implemented Interfaces:
ValidateableRule
-
Field Summary
Fields inherited from class net.minecraft.world.GameRules.Rule
type -
Constructor Summary
ConstructorsConstructorDescriptionDoubleRule(GameRules.Type<DoubleRule> type, double value, double minimumValue, double maximumValue) Deprecated.You should not be calling this constructor! -
Method Summary
Modifier and TypeMethodDescriptionprotected DoubleRulecopy()protected voiddeserialize(String value) doubleget()intprotected DoubleRulegetThis()protected voidsetFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) voidsetValue(DoubleRule rule, MinecraftServer minecraftServer) booleanValidates if a rule can accept the input.Methods inherited from class net.minecraft.world.GameRules.Rule
changed, set, toString
-
Constructor Details
-
DoubleRule
@Deprecated public DoubleRule(GameRules.Type<DoubleRule> type, double value, double minimumValue, double maximumValue) Deprecated.You should not be calling this constructor!
-
-
Method Details
-
setFromArgument
protected void setFromArgument(com.mojang.brigadier.context.CommandContext<ServerCommandSource> context, String name) - Specified by:
setFromArgumentin classGameRules.Rule<DoubleRule>
-
deserialize
- Specified by:
deserializein classGameRules.Rule<DoubleRule>
-
serialize
- Specified by:
serializein classGameRules.Rule<DoubleRule>
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResultin classGameRules.Rule<DoubleRule>
-
getThis
- Specified by:
getThisin classGameRules.Rule<DoubleRule>
-
copy
- Specified by:
copyin classGameRules.Rule<DoubleRule>
-
setValue
- Specified by:
setValuein classGameRules.Rule<DoubleRule>
-
validate
Description copied from interface:ValidateableRuleValidates if a rule can accept the input.- Specified by:
validatein interfaceValidateableRule- Parameters:
value- the value to validate- Returns:
- true if the value can be accepted.
-
get
public double get()
-