Record Class ItemUseFinishHandler.Insert
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.ItemUseFinishHandler.Insert
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
ItemUseFinishHandler
public static record ItemUseFinishHandler.Insert(net.minecraft.world.entity.LivingEntity living, net.minecraft.world.item.ItemStack item, int duration, InsertSetter<net.minecraft.world.item.ItemStack> result)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
ConstructorsConstructorDescriptionInsert(net.minecraft.world.entity.LivingEntity living, net.minecraft.world.item.ItemStack item, int duration, InsertSetter<net.minecraft.world.item.ItemStack> result) Creates an instance of aInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord 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.item.ItemStackitem()Returns the value of theitemrecord component.net.minecraft.world.entity.LivingEntityliving()Returns the value of thelivingrecord component.InsertSetter<net.minecraft.world.item.ItemStack> result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Insert
public Insert(net.minecraft.world.entity.LivingEntity living, net.minecraft.world.item.ItemStack item, int duration, InsertSetter<net.minecraft.world.item.ItemStack> result) Creates an instance of aInsertrecord class.- Parameters:
living- the value for thelivingrecord componentitem- the value for theitemrecord componentduration- the value for thedurationrecord componentresult- the value for theresultrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
living
public net.minecraft.world.entity.LivingEntity living()Returns the value of thelivingrecord component.- Returns:
- the value of the
livingrecord component
-
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-