Record Class InteractWithEntityHandler.Insert
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.InteractWithEntityHandler.Insert
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
InteractWithEntityHandler
public static record InteractWithEntityHandler.Insert(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.Entity target, InsertCanceller cancel, InsertSetter<net.minecraft.world.InteractionResult> cancelResult)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
ConstructorsConstructorDescriptionInsert(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.Entity target, InsertCanceller cancel, InsertSetter<net.minecraft.world.InteractionResult> cancelResult) Creates an instance of aInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncancel()Returns the value of thecancelrecord component.InsertSetter<net.minecraft.world.InteractionResult> Returns the value of thecancelResultrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.InteractionHandhand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.entity.player.Playerplayer()Returns the value of theplayerrecord component.net.minecraft.world.entity.Entitytarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Insert
public Insert(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.Entity target, InsertCanceller cancel, InsertSetter<net.minecraft.world.InteractionResult> cancelResult) Creates an instance of aInsertrecord class.- Parameters:
player- the value for theplayerrecord componenthand- the value for thehandrecord componenttarget- the value for thetargetrecord componentcancel- the value for thecancelrecord componentcancelResult- the value for thecancelResultrecord 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). -
player
public net.minecraft.world.entity.player.Player player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
hand
public net.minecraft.world.InteractionHand hand()Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
target
public net.minecraft.world.entity.Entity target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
cancel
Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-
cancelResult
Returns the value of thecancelResultrecord component.- Returns:
- the value of the
cancelResultrecord component
-