Record Class PackageOrderWithCrafts
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.stockTicker.PackageOrderWithCrafts
- Record Components:
stacks-amounts-
public record PackageOrderWithCrafts(PackageOrder orderedStacks, List<PackageOrderWithCrafts.CraftingEntry> orderedCrafts)
extends Record
Package ordering context containing additional information of package orders.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackageOrderWithCrafts> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, PackageOrderWithCrafts> -
Constructor Summary
ConstructorsConstructorDescriptionPackageOrderWithCrafts(PackageOrder orderedStacks, List<PackageOrderWithCrafts.CraftingEntry> orderedCrafts) Creates an instance of aPackageOrderWithCraftsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PackageOrderWithCraftsempty()final booleanIndicates whether some other object is "equal to" this one.static booleanfinal inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns the value of theorderedCraftsrecord component.Returns the value of theorderedStacksrecord component.booleanstatic PackageOrderWithCraftssimple(List<BigItemStack> orderedStacks) static PackageOrderWithCraftssingleRecipe(List<BigItemStack> pattern) stacks()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,PackageOrderWithCrafts> STREAM_CODEC
-
-
Constructor Details
-
PackageOrderWithCrafts
public PackageOrderWithCrafts(PackageOrder orderedStacks, List<PackageOrderWithCrafts.CraftingEntry> orderedCrafts) Creates an instance of aPackageOrderWithCraftsrecord class.- Parameters:
orderedStacks- the value for theorderedStacksrecord componentorderedCrafts- the value for theorderedCraftsrecord component
-
-
Method Details
-
empty
-
simple
-
singleRecipe
-
hasCraftingInformation
-
getCraftingInformation
-
stacks
-
isEmpty
public boolean isEmpty() -
orderedStacksMatchOrderedRecipes
public boolean orderedStacksMatchOrderedRecipes() -
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). -
orderedStacks
Returns the value of theorderedStacksrecord component.- Returns:
- the value of the
orderedStacksrecord component
-
orderedCrafts
Returns the value of theorderedCraftsrecord component.- Returns:
- the value of the
orderedCraftsrecord component
-