Record Class PlayerAttackHandler.Insert
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.living.player.PlayerAttackHandler.Insert
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
PlayerAttackHandler
public static record PlayerAttackHandler.Insert(net.minecraft.world.entity.player.Player thisPlayer, net.minecraft.world.entity.Entity target, InsertCanceller cancel)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
ConstructorsConstructorDescriptionInsert(net.minecraft.world.entity.player.Player thisPlayer, net.minecraft.world.entity.Entity target, InsertCanceller cancel) Creates an instance of aInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncancel()Returns the value of thecancelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.entity.Entitytarget()Returns the value of thetargetrecord component.net.minecraft.world.entity.player.PlayerReturns the value of thethisPlayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Insert
public Insert(net.minecraft.world.entity.player.Player thisPlayer, net.minecraft.world.entity.Entity target, InsertCanceller cancel) Creates an instance of aInsertrecord class.- Parameters:
thisPlayer- the value for thethisPlayerrecord componenttarget- the value for thetargetrecord componentcancel- the value for thecancelrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
thisPlayer
public net.minecraft.world.entity.player.Player thisPlayer()Returns the value of thethisPlayerrecord component.- Returns:
- the value of the
thisPlayerrecord 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
-