Package net.minecraft.util
Record Class HeldItemContext.Simple
java.lang.Object
java.lang.Record
net.minecraft.util.HeldItemContext.Simple
- Record Components:
getPos-getBodyYaw-getWorld-
- All Implemented Interfaces:
HeldItemContext
- Enclosing interface:
HeldItemContext
public static record HeldItemContext.Simple(Vec3d getPos, float getBodyYaw, World getWorld)
extends Record
implements HeldItemContext
- Mappings:
Namespace Name named net/minecraft/util/HeldItemContext$Simpleintermediary net/minecraft/class_11566$class_11567official caz$anamed getPosintermediary comp_4424official anamed getBodyYawintermediary comp_4425official bnamed getWorldintermediary comp_4426official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.HeldItemContext
HeldItemContext.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thegetBodyYawrecord component.private final Vec3dThe field for thegetPosrecord component.private final WorldThe field for thegetWorldrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thegetBodyYawrecord component.getPos()Returns the value of thegetPosrecord component.getWorld()Returns the value of thegetWorldrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.HeldItemContext
getEntity
-
Field Details
-
getPos
The field for thegetPosrecord component. -
getBodyYaw
private final float getBodyYawThe field for thegetBodyYawrecord component. -
getWorld
The field for thegetWorldrecord component.
-
-
Constructor Details
-
Simple
-
-
Method Details
-
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. -
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. -
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
getPos
Returns the value of thegetPosrecord component.- Specified by:
getPosin interfaceHeldItemContext- Returns:
- the value of the
getPosrecord component
-
getBodyYaw
public float getBodyYaw()Returns the value of thegetBodyYawrecord component.- Specified by:
getBodyYawin interfaceHeldItemContext- Returns:
- the value of the
getBodyYawrecord component
-
getWorld
Returns the value of thegetWorldrecord component.- Specified by:
getWorldin interfaceHeldItemContext- Returns:
- the value of the
getWorldrecord component
-