Record Class DefaultPosArgument

java.lang.Object
java.lang.Record
net.minecraft.command.argument.DefaultPosArgument
Record Components:
x -
y -
z -
All Implemented Interfaces:
PosArgument

public record DefaultPosArgument(CoordinateArgument x, CoordinateArgument y, CoordinateArgument z) extends Record implements PosArgument
Mappings:
Namespace Name
named net/minecraft/command/argument/DefaultPosArgument
intermediary net/minecraft/class_2280
official gs
named x
intermediary comp_4926
official b
named y
intermediary comp_4927
official c
named z
intermediary comp_4928
official d
  • Field Details

    • x

      private final CoordinateArgument x
      The field for the x record component.
    • y

      private final CoordinateArgument y
      The field for the y record component.
    • z

      private final CoordinateArgument z
      The field for the z record component.
    • DEFAULT_ROTATION

      public static final DefaultPosArgument DEFAULT_ROTATION
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_ROTATION Lnet/minecraft/command/argument/DefaultPosArgument;DEFAULT_ROTATION:Lnet/minecraft/command/argument/DefaultPosArgument;
      intermediary field_63064 Lnet/minecraft/class_2280;field_63064:Lnet/minecraft/class_2280;
      official a Lgs;a:Lgs;
  • Constructor Details

    • DefaultPosArgument

      public DefaultPosArgument(CoordinateArgument x, CoordinateArgument y, CoordinateArgument z)
      Creates an instance of a DefaultPosArgument record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      z - the value for the z record component
  • Method Details

    • getPos

      public Vec3d getPos(ServerCommandSource source)
      Specified by:
      getPos in interface PosArgument
      Mappings:
      Namespace Name Mixin selector
      named getPos Lnet/minecraft/command/argument/PosArgument;getPos(Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/util/math/Vec3d;
      intermediary method_9708 Lnet/minecraft/class_2267;method_9708(Lnet/minecraft/class_2168;)Lnet/minecraft/class_243;
      official a Lgl;a(Lej;)Lfoh;
    • getRotation

      public Vec2f getRotation(ServerCommandSource source)
      Specified by:
      getRotation in interface PosArgument
      Mappings:
      Namespace Name Mixin selector
      named getRotation Lnet/minecraft/command/argument/PosArgument;getRotation(Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/util/math/Vec2f;
      intermediary method_9709 Lnet/minecraft/class_2267;method_9709(Lnet/minecraft/class_2168;)Lnet/minecraft/class_241;
      official b Lgl;b(Lej;)Lfog;
    • isXRelative

      public boolean isXRelative()
      Specified by:
      isXRelative in interface PosArgument
      Mappings:
      Namespace Name Mixin selector
      named isXRelative Lnet/minecraft/command/argument/PosArgument;isXRelative()Z
      intermediary method_9705 Lnet/minecraft/class_2267;method_9705()Z
      official a Lgl;a()Z
    • isYRelative

      public boolean isYRelative()
      Specified by:
      isYRelative in interface PosArgument
      Mappings:
      Namespace Name Mixin selector
      named isYRelative Lnet/minecraft/command/argument/PosArgument;isYRelative()Z
      intermediary method_9706 Lnet/minecraft/class_2267;method_9706()Z
      official b Lgl;b()Z
    • isZRelative

      public boolean isZRelative()
      Specified by:
      isZRelative in interface PosArgument
      Mappings:
      Namespace Name Mixin selector
      named isZRelative Lnet/minecraft/command/argument/PosArgument;isZRelative()Z
      intermediary method_9707 Lnet/minecraft/class_2267;method_9707()Z
      official c Lgl;c()Z
    • parse

      public static DefaultPosArgument 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/DefaultPosArgument;parse(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/argument/DefaultPosArgument;
      intermediary method_9749 Lnet/minecraft/class_2280;method_9749(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_2280;
      official a Lgs;a(Lcom/mojang/brigadier/StringReader;)Lgs;
    • parse

      public static DefaultPosArgument 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/DefaultPosArgument;parse(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/command/argument/DefaultPosArgument;
      intermediary method_9750 Lnet/minecraft/class_2280;method_9750(Lcom/mojang/brigadier/StringReader;Z)Lnet/minecraft/class_2280;
      official a Lgs;a(Lcom/mojang/brigadier/StringReader;Z)Lgs;
    • absolute

      public static DefaultPosArgument absolute(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named absolute Lnet/minecraft/command/argument/DefaultPosArgument;absolute(DDD)Lnet/minecraft/command/argument/DefaultPosArgument;
      intermediary method_35810 Lnet/minecraft/class_2280;method_35810(DDD)Lnet/minecraft/class_2280;
      official a Lgs;a(DDD)Lgs;
    • absolute

      public static DefaultPosArgument absolute(Vec2f vec)
      Mappings:
      Namespace Name Mixin selector
      named absolute Lnet/minecraft/command/argument/DefaultPosArgument;absolute(Lnet/minecraft/util/math/Vec2f;)Lnet/minecraft/command/argument/DefaultPosArgument;
      intermediary method_35811 Lnet/minecraft/class_2280;method_35811(Lnet/minecraft/class_241;)Lnet/minecraft/class_2280;
      official a Lgs;a(Lfog;)Lgs;
    • 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 Objects::equals(Object,Object).
      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.
    • x

      public CoordinateArgument x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public CoordinateArgument y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • z

      public CoordinateArgument z()
      Returns the value of the z record component.
      Returns:
      the value of the z record component