Package dev.thomasglasser.sherdsapi.impl
Record Class StackPotDecorations
java.lang.Object
java.lang.Record
dev.thomasglasser.sherdsapi.impl.StackPotDecorations
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<StackPotDecorations> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, StackPotDecorations> -
Constructor Summary
ConstructorsConstructorDescriptionStackPotDecorations(Optional<net.minecraft.world.item.ItemStack> back, Optional<net.minecraft.world.item.ItemStack> left, Optional<net.minecraft.world.item.ItemStack> right, Optional<net.minecraft.world.item.ItemStack> front) Creates an instance of aStackPotDecorationsrecord class.StackPotDecorations(net.minecraft.world.item.ItemStack p_331754_, net.minecraft.world.item.ItemStack p_331488_, net.minecraft.world.item.ItemStack p_331845_, net.minecraft.world.item.ItemStack p_330988_) -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.world.item.ItemStack> back()Returns the value of thebackrecord component.static net.minecraft.world.item.ItemStackcreateDecoratedPotItem(StackPotDecorations decorations) final booleanIndicates whether some other object is "equal to" this one.Optional<net.minecraft.world.item.ItemStack> front()Returns the value of thefrontrecord component.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.world.item.ItemStack> left()Returns the value of theleftrecord component.static @Nullable StackPotDecorationsload(@Nullable net.minecraft.nbt.CompoundTag tag) List<net.minecraft.world.item.ItemStack> ordered()Optional<net.minecraft.world.item.ItemStack> right()Returns the value of therightrecord component.net.minecraft.nbt.CompoundTagsave(net.minecraft.nbt.CompoundTag tag) 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,StackPotDecorations> STREAM_CODEC
-
-
Constructor Details
-
StackPotDecorations
public StackPotDecorations(net.minecraft.world.item.ItemStack p_331754_, net.minecraft.world.item.ItemStack p_331488_, net.minecraft.world.item.ItemStack p_331845_, net.minecraft.world.item.ItemStack p_330988_) -
StackPotDecorations
public StackPotDecorations(Optional<net.minecraft.world.item.ItemStack> back, Optional<net.minecraft.world.item.ItemStack> left, Optional<net.minecraft.world.item.ItemStack> right, Optional<net.minecraft.world.item.ItemStack> front) Creates an instance of aStackPotDecorationsrecord class.- Parameters:
back- the value for thebackrecord componentleft- the value for theleftrecord componentright- the value for therightrecord componentfront- the value for thefrontrecord component
-
-
Method Details
-
save
public net.minecraft.nbt.CompoundTag save(net.minecraft.nbt.CompoundTag tag) -
ordered
-
load
@Nullable public static @Nullable StackPotDecorations load(@Nullable @Nullable net.minecraft.nbt.CompoundTag tag) -
createDecoratedPotItem
public static net.minecraft.world.item.ItemStack createDecoratedPotItem(StackPotDecorations decorations) -
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). -
back
Returns the value of thebackrecord component.- Returns:
- the value of the
backrecord component
-
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
front
Returns the value of thefrontrecord component.- Returns:
- the value of the
frontrecord component
-