Class DoubleRule
java.lang.Object
net.minecraft.world.GameRules.Rule<DoubleRule>
net.fabricmc.fabric.api.gamerule.v1.rule.DoubleRule
- All Implemented Interfaces:
ValidateableRule
public final class DoubleRule
extends net.minecraft.world.GameRules.Rule<DoubleRule>
implements ValidateableRule
-
Field Summary
Fields inherited from class net.minecraft.world.GameRules.Rule
type
-
Constructor Summary
ConstructorDescriptionDoubleRule
(net.minecraft.world.GameRules.Type<DoubleRule> type, double value, double minimumValue, double maximumValue) Deprecated.You should not be calling this constructor! -
Method Summary
Modifier and TypeMethodDescriptionprotected DoubleRule
copy()
protected void
deserialize
(String value) double
get()
int
protected DoubleRule
getThis()
protected void
setFromArgument
(com.mojang.brigadier.context.CommandContext<net.minecraft.server.command.ServerCommandSource> context, String name) void
setValue
(DoubleRule rule, net.minecraft.server.MinecraftServer minecraftServer) boolean
Validates 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(net.minecraft.world.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<net.minecraft.server.command.ServerCommandSource> context, String name) - Specified by:
setFromArgument
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
deserialize
- Specified by:
deserialize
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
serialize
- Specified by:
serialize
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
getCommandResult
public int getCommandResult()- Specified by:
getCommandResult
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
getThis
- Specified by:
getThis
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
copy
- Specified by:
copy
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
setValue
- Specified by:
setValue
in classnet.minecraft.world.GameRules.Rule<DoubleRule>
-
validate
Description copied from interface:ValidateableRule
Validates if a rule can accept the input.- Specified by:
validate
in interfaceValidateableRule
- Parameters:
value
- the value to validate- Returns:
- true if the value can be accepted.
-
get
public double get()
-