Record Class HeldItemContext.Offset

java.lang.Object
java.lang.Record
net.minecraft.util.HeldItemContext.Offset
Record Components:
owner -
offset -
All Implemented Interfaces:
HeldItemContext
Enclosing interface:
HeldItemContext

public static record HeldItemContext.Offset(HeldItemContext owner, Vec3d offset) extends Record implements HeldItemContext
Mappings:
Namespace Name
named net/minecraft/util/HeldItemContext$Offset
intermediary net/minecraft/class_11566$class_11726
official ces$a
named owner
intermediary comp_4597
official a
named offset
intermediary comp_4598
official b
  • Field Details

    • owner

      private final HeldItemContext owner
      The field for the owner record component.
    • offset

      private final Vec3d offset
      The field for the offset record component.
  • Constructor Details

  • Method Details

    • getEntityWorld

      public World getEntityWorld()
      Specified by:
      getEntityWorld in interface HeldItemContext
      Mappings:
      Namespace Name Mixin selector
      named getEntityWorld Lnet/minecraft/util/HeldItemContext;getEntityWorld()Lnet/minecraft/world/World;
      intermediary method_73183 Lnet/minecraft/class_11566;method_73183()Lnet/minecraft/class_1937;
      official an Lces;an()Ldrq;
    • getEntityPos

      public Vec3d getEntityPos()
      Specified by:
      getEntityPos in interface HeldItemContext
      Mappings:
      Namespace Name Mixin selector
      named getEntityPos Lnet/minecraft/util/HeldItemContext;getEntityPos()Lnet/minecraft/util/math/Vec3d;
      intermediary method_73189 Lnet/minecraft/class_11566;method_73189()Lnet/minecraft/class_243;
      official dD Lces;dD()Lfoh;
    • getBodyYaw

      public float getBodyYaw()
      Specified by:
      getBodyYaw in interface HeldItemContext
      Mappings:
      Namespace Name Mixin selector
      named getBodyYaw Lnet/minecraft/util/HeldItemContext;getBodyYaw()F
      intermediary method_73188 Lnet/minecraft/class_11566;method_73188()F
      official dY Lces;dY()F
    • getEntity

      @Nullable public @Nullable LivingEntity getEntity()
      Specified by:
      getEntity in interface HeldItemContext
      Mappings:
      Namespace Name Mixin selector
      named getEntity Lnet/minecraft/util/HeldItemContext;getEntity()Lnet/minecraft/entity/LivingEntity;
      intermediary method_72393 Lnet/minecraft/class_11566;method_72393()Lnet/minecraft/class_1309;
      official eo Lces;eo()Lcew;
    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • owner

      public HeldItemContext owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • offset

      public Vec3d offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component