Package com.wdiscute.starcatcher.io
Record Class SingleStackContainer
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.io.SingleStackContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SingleStackContainer> static final List<SingleStackContainer> static final com.mojang.serialization.Codec<List<SingleStackContainer>> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SingleStackContainer> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, List<SingleStackContainer>> -
Constructor Summary
ConstructorsConstructorDescriptionSingleStackContainer(net.minecraft.world.item.ItemStack stackDoNotUse) Creates an instance of aSingleStackContainerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SingleStackContainerempty()booleanIndicates whether some other object is "equal to" this one.static SingleStackContainerfrom(net.minecraft.world.item.ItemStack itemStack) static List<SingleStackContainer> fromItemStackHandler(net.neoforged.neoforge.items.ItemStackHandler prizePool) final inthashCode()Returns a hash code value for this object.booleanisEmpty()net.minecraft.world.item.ItemStackstack()net.minecraft.world.item.ItemStackDeprecated.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
LIST_CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SingleStackContainer> STREAM_CODEC -
STREAM_CODEC_LIST
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,List<SingleStackContainer>> STREAM_CODEC_LIST -
EMPTY_LIST
-
-
Constructor Details
-
SingleStackContainer
Creates an instance of aSingleStackContainerrecord class.- Parameters:
stackDoNotUse- the value for thestackDoNotUserecord component
-
-
Method Details
-
from
-
fromItemStackHandler
public static List<SingleStackContainer> fromItemStackHandler(net.neoforged.neoforge.items.ItemStackHandler prizePool) -
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). -
stack
public net.minecraft.world.item.ItemStack stack() -
empty
-
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. -
stackDoNotUse
Deprecated.Returns the value of thestackDoNotUserecord component.- Returns:
- the value of the
stackDoNotUserecord component
-