Record Class AnvilContentChangeHandler.Ins
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.AnvilContentChangeHandler.Ins
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
- AnvilContentChangeHandler
public static record AnvilContentChangeHandler.Ins(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack right, String name, net.minecraft.world.entity.player.Player player, InsertSetter<net.minecraft.world.item.ItemStack> output, InsertSetter<Long> cost, InsertSetter<Boolean> canTakeOnZeroExp, InsertSetter<Integer> materialCost, InsertCanceller cancel)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
ConstructorsConstructorDescriptionIns(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack right, String name, net.minecraft.world.entity.player.Player player, InsertSetter<net.minecraft.world.item.ItemStack> output, InsertSetter<Long> cost, InsertSetter<Boolean> canTakeOnZeroExp, InsertSetter<Integer> materialCost, InsertCanceller cancel) Creates an instance of aInsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncancel()Returns the value of thecancelrecord component.Returns the value of thecanTakeOnZeroExprecord component.cost()Returns the value of thecostrecord 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.ItemStackleft()Returns the value of theleftrecord component.Returns the value of thematerialCostrecord component.name()Returns the value of thenamerecord component.InsertSetter<net.minecraft.world.item.ItemStack>output()Returns the value of theoutputrecord component.net.minecraft.world.entity.player.Playerplayer()Returns the value of theplayerrecord component.net.minecraft.world.item.ItemStackright()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Ins
public Ins(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack right, String name, net.minecraft.world.entity.player.Player player, InsertSetter<net.minecraft.world.item.ItemStack> output, InsertSetter<Long> cost, InsertSetter<Boolean> canTakeOnZeroExp, InsertSetter<Integer> materialCost, InsertCanceller cancel) Creates an instance of aInsrecord class.- Parameters:
left- the value for theleftrecord componentright- the value for therightrecord componentname- the value for thenamerecord componentplayer- the value for theplayerrecord componentoutput- the value for theoutputrecord componentcost- the value for thecostrecord componentcanTakeOnZeroExp- the value for thecanTakeOnZeroExprecord componentmaterialCost- the value for thematerialCostrecord 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). -
left
public net.minecraft.world.item.ItemStack left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
public net.minecraft.world.item.ItemStack right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
player
public net.minecraft.world.entity.player.Player player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
cost
Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-
canTakeOnZeroExp
Returns the value of thecanTakeOnZeroExprecord component.- Returns:
- the value of the
canTakeOnZeroExprecord component
-
materialCost
Returns the value of thematerialCostrecord component.- Returns:
- the value of the
materialCostrecord component
-
cancel
Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-