Record Class PackageItem.PackageOrderData
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.box.PackageItem.PackageOrderData
- Enclosing class:
PackageItem
public static record PackageItem.PackageOrderData(int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, @Nullable PackageOrderWithCrafts orderContext)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackageItem.PackageOrderData> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, PackageItem.PackageOrderData> -
Constructor Summary
ConstructorsConstructorDescriptionPackageOrderData(int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, PackageOrderWithCrafts orderContext) Creates an instance of aPackageOrderDatarecord class.PackageOrderData(int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, Optional<PackageOrderWithCrafts> orderContext) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefragmentIndexrecord component.final inthashCode()Returns a hash code value for this object.booleanisFinal()Returns the value of theisFinalrecord component.booleanReturns the value of theisFinalLinkrecord component.intReturns the value of thelinkIndexrecord component.Returns the value of theorderContextrecord component.intorderId()Returns the value of theorderIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,PackageItem.PackageOrderData> STREAM_CODEC
-
-
Constructor Details
-
PackageOrderData
public PackageOrderData(int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, Optional<PackageOrderWithCrafts> orderContext) -
PackageOrderData
public PackageOrderData(int orderId, int linkIndex, boolean isFinalLink, int fragmentIndex, boolean isFinal, @Nullable PackageOrderWithCrafts orderContext) Creates an instance of aPackageOrderDatarecord class.- Parameters:
orderId- the value for theorderIdrecord componentlinkIndex- the value for thelinkIndexrecord componentisFinalLink- the value for theisFinalLinkrecord componentfragmentIndex- the value for thefragmentIndexrecord componentisFinal- the value for theisFinalrecord componentorderContext- the value for theorderContextrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
orderId
public int orderId()Returns the value of theorderIdrecord component.- Returns:
- the value of the
orderIdrecord component
-
linkIndex
public int linkIndex()Returns the value of thelinkIndexrecord component.- Returns:
- the value of the
linkIndexrecord component
-
isFinalLink
public boolean isFinalLink()Returns the value of theisFinalLinkrecord component.- Returns:
- the value of the
isFinalLinkrecord component
-
fragmentIndex
public int fragmentIndex()Returns the value of thefragmentIndexrecord component.- Returns:
- the value of the
fragmentIndexrecord component
-
isFinal
public boolean isFinal()Returns the value of theisFinalrecord component.- Returns:
- the value of the
isFinalrecord component
-
orderContext
Returns the value of theorderContextrecord component.- Returns:
- the value of the
orderContextrecord component
-