Package tschipp.linear.build
Record Class LinearState.Drag
java.lang.Object
java.lang.Record
tschipp.linear.build.LinearState.Drag
- Enclosing class:
LinearState
public static record LinearState.Drag(net.minecraft.core.BlockPos start, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction face, net.minecraft.world.phys.Vec3 hitOffset)
extends Record
A line being dragged. The face and hit offset of the first click are used for every block.
-
Constructor Summary
ConstructorsConstructorDescriptionDrag(net.minecraft.core.BlockPos start, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction face, net.minecraft.world.phys.Vec3 hitOffset) Creates an instance of aDragrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.Directionface()Returns the value of thefacerecord component.net.minecraft.world.InteractionHandhand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3Returns the value of thehitOffsetrecord component.net.minecraft.core.BlockPosstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Drag
public Drag(net.minecraft.core.BlockPos start, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction face, net.minecraft.world.phys.Vec3 hitOffset) Creates an instance of aDragrecord class.- Parameters:
start- the value for thestartrecord componenthand- the value for thehandrecord componentface- the value for thefacerecord componenthitOffset- the value for thehitOffsetrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
start
public net.minecraft.core.BlockPos start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
hand
public net.minecraft.world.InteractionHand hand()Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
face
public net.minecraft.core.Direction face()Returns the value of thefacerecord component.- Returns:
- the value of the
facerecord component
-
hitOffset
public net.minecraft.world.phys.Vec3 hitOffset()Returns the value of thehitOffsetrecord component.- Returns:
- the value of the
hitOffsetrecord component
-