Record Class PackagingRequest
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.packager.PackagingRequest
public record PackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, @Nullable PackageOrderWithCrafts context)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, @Nullable PackageOrderWithCrafts context) Creates an instance of aPackagingRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.@Nullable PackageOrderWithCraftscontext()Returns the value of thecontextrecord component.org.apache.commons.lang3.mutable.MutableIntcount()Returns the value of thecountrecord component.static PackagingRequestcreate(net.minecraft.world.item.ItemStack item, int count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, int packageCount, int orderId, @Nullable PackageOrderWithCrafts context) final booleanIndicates whether some other object is "equal to" this one.org.apache.commons.lang3.mutable.MutableBooleanReturns the value of thefinalLinkrecord component.intgetCount()final inthashCode()Returns a hash code value for this object.booleanisEmpty()net.minecraft.world.item.ItemStackitem()Returns the value of theitemrecord component.intReturns the value of thelinkIndexrecord component.intorderId()Returns the value of theorderIdrecord component.org.apache.commons.lang3.mutable.MutableIntReturns the value of thepackageCounterrecord component.voidsubtract(int toSubtract) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PackagingRequest
public PackagingRequest(net.minecraft.world.item.ItemStack item, org.apache.commons.lang3.mutable.MutableInt count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, org.apache.commons.lang3.mutable.MutableInt packageCounter, int orderId, @Nullable @Nullable PackageOrderWithCrafts context) Creates an instance of aPackagingRequestrecord class.- Parameters:
item- the value for theitemrecord componentcount- the value for thecountrecord componentaddress- the value for theaddressrecord componentlinkIndex- the value for thelinkIndexrecord componentfinalLink- the value for thefinalLinkrecord componentpackageCounter- the value for thepackageCounterrecord componentorderId- the value for theorderIdrecord componentcontext- the value for thecontextrecord component
-
-
Method Details
-
create
public static PackagingRequest create(net.minecraft.world.item.ItemStack item, int count, String address, int linkIndex, org.apache.commons.lang3.mutable.MutableBoolean finalLink, int packageCount, int orderId, @Nullable @Nullable PackageOrderWithCrafts context) -
getCount
public int getCount() -
subtract
public void subtract(int toSubtract) -
isEmpty
public boolean isEmpty() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
count
public org.apache.commons.lang3.mutable.MutableInt count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
linkIndex
public int linkIndex()Returns the value of thelinkIndexrecord component.- Returns:
- the value of the
linkIndexrecord component
-
finalLink
public org.apache.commons.lang3.mutable.MutableBoolean finalLink()Returns the value of thefinalLinkrecord component.- Returns:
- the value of the
finalLinkrecord component
-
packageCounter
public org.apache.commons.lang3.mutable.MutableInt packageCounter()Returns the value of thepackageCounterrecord component.- Returns:
- the value of the
packageCounterrecord component
-
orderId
public int orderId()Returns the value of theorderIdrecord component.- Returns:
- the value of the
orderIdrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-