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

    Constructors
    Constructor
    Description
    DoubleRule(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 Type
    Method
    Description
    protected DoubleRule
     
    protected void
     
    double
    get()
     
    int
     
    protected DoubleRule
     
     
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 class net.minecraft.world.GameRules.Rule<DoubleRule>
    • deserialize

      protected void deserialize(String value)
      Specified by:
      deserialize in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • serialize

      public String serialize()
      Specified by:
      serialize in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • getCommandResult

      public int getCommandResult()
      Specified by:
      getCommandResult in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • getThis

      protected DoubleRule getThis()
      Specified by:
      getThis in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • copy

      protected DoubleRule copy()
      Specified by:
      copy in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • setValue

      public void setValue(DoubleRule rule, net.minecraft.server.MinecraftServer minecraftServer)
      Specified by:
      setValue in class net.minecraft.world.GameRules.Rule<DoubleRule>
    • validate

      public boolean validate(String value)
      Description copied from interface: ValidateableRule
      Validates if a rule can accept the input.
      Specified by:
      validate in interface ValidateableRule
      Parameters:
      value - the value to validate
      Returns:
      true if the value can be accepted.
    • get

      public double get()