Record Class LookingPosArgument

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

public record LookingPosArgument(double x, double y, double z) extends Record implements PosArgument
Mappings:
Namespace Name
named net/minecraft/command/argument/LookingPosArgument
intermediary net/minecraft/class_2268
official gm
named x
intermediary comp_4921
official b
named y
intermediary comp_4922
official c
named z
intermediary comp_4923
official d
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final char
     
    private final double
    The field for the x record component.
    private final double
    The field for the y record component.
    private final double
    The field for the z record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LookingPosArgument(double x, double y, double z)
    Creates an instance of a LookingPosArgument 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
     
    boolean
     
    boolean
     
    parse(com.mojang.brigadier.StringReader reader)
     
    private static double
    readCoordinate(com.mojang.brigadier.StringReader reader, int startingCursorPos)
     
    final String
    Returns a string representation of this record class.
    double
    x()
    Returns the value of the x record component.
    double
    y()
    Returns the value of the y record component.
    double
    z()
    Returns the value of the z record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.command.argument.PosArgument

    toAbsoluteBlockPos
  • Field Details

    • x

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

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

      private final double z
      The field for the z record component.
    • CARET

      public static final char CARET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named CARET Lnet/minecraft/command/argument/LookingPosArgument;CARET:C
      intermediary field_32941 Lnet/minecraft/class_2268;field_32941:C
      official a Lgm;a:C
  • Constructor Details

    • LookingPosArgument

      public LookingPosArgument(double x, double y, double z)
      Creates an instance of a LookingPosArgument 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 LookingPosArgument 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/LookingPosArgument;parse(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/argument/LookingPosArgument;
      intermediary method_9711 Lnet/minecraft/class_2268;method_9711(Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_2268;
      official a Lgm;a(Lcom/mojang/brigadier/StringReader;)Lgm;
    • readCoordinate

      private static double readCoordinate(com.mojang.brigadier.StringReader reader, int startingCursorPos) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named readCoordinate Lnet/minecraft/command/argument/LookingPosArgument;readCoordinate(Lcom/mojang/brigadier/StringReader;I)D
      intermediary method_9710 Lnet/minecraft/class_2268;method_9710(Lcom/mojang/brigadier/StringReader;I)D
      official a Lgm;a(Lcom/mojang/brigadier/StringReader;I)D
    • 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.
    • x

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

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

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