Record Class CoordinateArgument

java.lang.Object
java.lang.Record
net.minecraft.command.argument.CoordinateArgument
Record Components:
relative -
value -

public record CoordinateArgument(boolean relative, double value) extends Record
Mappings:
Namespace Name
named net/minecraft/command/argument/CoordinateArgument
intermediary net/minecraft/class_2278
official gr
named relative
intermediary comp_4924
official c
named value
intermediary comp_4925
official d
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
     
    static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
     
    private final boolean
    The field for the relative record component.
    private static final char
     
    private final double
    The field for the value record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CoordinateArgument(boolean relative, double value)
    Creates an instance of a CoordinateArgument record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    static boolean
    isRelative(com.mojang.brigadier.StringReader reader)
     
    parse(com.mojang.brigadier.StringReader reader)
     
    parse(com.mojang.brigadier.StringReader reader, boolean centerIntegers)
     
    boolean
    Returns the value of the relative record component.
    double
    toAbsoluteCoordinate(double offset)
     
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the value record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • relative

      private final boolean relative
      The field for the relative record component.
    • value

      private final double value
      The field for the value record component.
    • TILDE

      private static final char TILDE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named TILDE Lnet/minecraft/command/argument/CoordinateArgument;TILDE:C
      intermediary field_32972 Lnet/minecraft/class_2278;field_32972:C
      official e Lgr;e:C
    • MISSING_COORDINATE

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType MISSING_COORDINATE
      Mappings:
      Namespace Name Mixin selector
      named MISSING_COORDINATE Lnet/minecraft/command/argument/CoordinateArgument;MISSING_COORDINATE:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_10759 Lnet/minecraft/class_2278;field_10759:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      official a Lgr;a:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
    • MISSING_BLOCK_POSITION

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType MISSING_BLOCK_POSITION
      Mappings:
      Namespace Name Mixin selector
      named MISSING_BLOCK_POSITION Lnet/minecraft/command/argument/CoordinateArgument;MISSING_BLOCK_POSITION:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      intermediary field_10761 Lnet/minecraft/class_2278;field_10761:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
      official b Lgr;b:Lcom/mojang/brigadier/exceptions/SimpleCommandExceptionType;
  • Constructor Details

    • CoordinateArgument

      public CoordinateArgument(boolean relative, double value)
      Creates an instance of a CoordinateArgument record class.
      Parameters:
      relative - the value for the relative record component
      value - the value for the value record component
  • Method Details

    • toAbsoluteCoordinate

      public double toAbsoluteCoordinate(double offset)
      Mappings:
      Namespace Name Mixin selector
      named toAbsoluteCoordinate Lnet/minecraft/command/argument/CoordinateArgument;toAbsoluteCoordinate(D)D
      intermediary method_9740 Lnet/minecraft/class_2278;method_9740(D)D
      official a Lgr;a(D)D
    • parse

      public static CoordinateArgument parse(com.mojang.brigadier.StringReader reader, boolean centerIntegers) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/command/argument/CoordinateArgument;parse(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/command/argument/CoordinateArgument;
      intermediary method_9743 Lnet/minecraft/class_2278;method_9743(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/class_2278;
      official a Lgr;a(Lcom/mojang/brigadier/StringReader;Z)Lgr;
    • parse

      public static CoordinateArgument parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named parse Lnet/minecraft/command/argument/CoordinateArgument;parse(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/argument/CoordinateArgument;
      intermediary method_9739 Lnet/minecraft/class_2278;method_9739(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_2278;
      official a Lgr;a(Lcom/mojang/brigadier/StringReader;)Lgr;
    • isRelative

      public static boolean isRelative(com.mojang.brigadier.StringReader reader)
      Mappings:
      Namespace Name Mixin selector
      named isRelative Lnet/minecraft/command/argument/CoordinateArgument;isRelative(Lcom/mojang/brigadier/StringReader;)Z
      intermediary method_9742 Lnet/minecraft/class_2278;method_9742(Lcom/mojang/brigadier/StringReader;)Z
      official b Lgr;b(Lcom/mojang/brigadier/StringReader;)Z
    • isRelative

      public boolean isRelative()
      Mappings:
      Namespace Name Mixin selector
      named isRelative Lnet/minecraft/command/argument/CoordinateArgument;isRelative()Z
      intermediary method_9741 Lnet/minecraft/class_2278;method_9741()Z
      official a Lgr;a()Z
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • relative

      public boolean relative()
      Returns the value of the relative record component.
      Returns:
      the value of the relative record component
    • value

      public double value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component