Record Class InteractWithBlockHandler.Insert
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.InteractWithBlockHandler.Insert
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
- InteractWithBlockHandler
public static record InteractWithBlockHandler.Insert(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult, InsertResultCanceller<net.minecraft.world.InteractionResult> cancel)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
ConstructorsConstructorDescriptionInsert(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult, InsertResultCanceller<net.minecraft.world.InteractionResult> cancel) Creates an instance of aInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionInsertResultCanceller<net.minecraft.world.InteractionResult>cancel()Returns the value of thecancelrecord 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.phys.BlockHitResultReturns the value of thehitResultrecord component.net.minecraft.world.level.Levellevel()Returns the value of thelevelrecord component.net.minecraft.world.entity.player.Playerplayer()Returns the value of theplayerrecord 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.level.Level level, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult, InsertResultCanceller<net.minecraft.world.InteractionResult> cancel) Creates an instance of aInsertrecord class.- Parameters:
player- the value for theplayerrecord componentlevel- the value for thelevelrecord componenthand- the value for thehandrecord componenthitResult- the value for thehitResultrecord componentcancel- the value for thecancelrecord 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
-
level
public net.minecraft.world.level.Level level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
hand
public net.minecraft.world.InteractionHand hand()Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
hitResult
public net.minecraft.world.phys.BlockHitResult hitResult()Returns the value of thehitResultrecord component.- Returns:
- the value of the
hitResultrecord component
-
cancel
Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-