Record Class ShoppingListItem.ShoppingList
java.lang.Object
java.lang.Record
com.simibubi.create.content.logistics.tableCloth.ShoppingListItem.ShoppingList
- Enclosing class:
ShoppingListItem
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ShoppingListItem.ShoppingList> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, ShoppingListItem.ShoppingList> -
Constructor Summary
ConstructorsConstructorDescriptionShoppingList(@Unmodifiable List<net.createmod.catnip.data.IntAttached<net.minecraft.core.BlockPos>> purchases, UUID shopOwner, UUID shopNetwork) Creates an instance of aShoppingListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.createmod.catnip.data.Couple<InventorySummary> bakeEntries(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos clothPosToIgnore) final booleanIndicates whether some other object is "equal to" this one.intgetPurchases(net.minecraft.core.BlockPos clothPos) final inthashCode()Returns a hash code value for this object.@Unmodifiable List<net.createmod.catnip.data.IntAttached<net.minecraft.core.BlockPos>> Returns the value of thepurchasesrecord component.Returns the value of theshopNetworkrecord component.Returns the value of theshopOwnerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,ShoppingListItem.ShoppingList> STREAM_CODEC
-
-
Constructor Details
-
ShoppingList
public ShoppingList(@Unmodifiable List<net.createmod.catnip.data.IntAttached<net.minecraft.core.BlockPos>> purchases, UUID shopOwner, UUID shopNetwork) Creates an instance of aShoppingListrecord class.- Parameters:
purchases- the value for thepurchasesrecord componentshopOwner- the value for theshopOwnerrecord componentshopNetwork- the value for theshopNetworkrecord component
-
-
Method Details
-
duplicate
-
getPurchases
public int getPurchases(net.minecraft.core.BlockPos clothPos) -
bakeEntries
public net.createmod.catnip.data.Couple<InventorySummary> bakeEntries(net.minecraft.world.level.LevelAccessor level, @Nullable net.minecraft.core.BlockPos clothPosToIgnore) -
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). -
purchases
public @Unmodifiable List<net.createmod.catnip.data.IntAttached<net.minecraft.core.BlockPos>> purchases()Returns the value of thepurchasesrecord component.- Returns:
- the value of the
purchasesrecord component
-
shopOwner
Returns the value of theshopOwnerrecord component.- Returns:
- the value of the
shopOwnerrecord component
-
shopNetwork
Returns the value of theshopNetworkrecord component.- Returns:
- the value of the
shopNetworkrecord component
-