Record Class StackPotDecorations
java.lang.Object
java.lang.Record
dev.thomasglasser.sherdsapi.impl.StackPotDecorations
- All Implemented Interfaces:
net.minecraft.world.item.component.TooltipProvider
public record 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)
extends Record
implements net.minecraft.world.item.component.TooltipProvider
-
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 back, net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack right, net.minecraft.world.item.ItemStack front) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTooltip(net.minecraft.world.item.Item.TooltipContext context, Consumer<net.minecraft.network.chat.Component> consumer, net.minecraft.world.item.TooltipFlag flag, net.minecraft.core.component.DataComponentGetter components) Optional<net.minecraft.world.item.ItemStack> back()Returns the value of thebackrecord component.booleanIndicates whether some other object is "equal to" this one.Optional<net.minecraft.world.item.ItemStack> front()Returns the value of thefrontrecord component.inthashCode()Returns a hash code value for this object.Optional<net.minecraft.world.item.ItemStack> left()Returns the value of theleftrecord component.List<net.minecraft.world.item.ItemStack> ordered()Optional<net.minecraft.world.item.ItemStack> right()Returns the value of therightrecord 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, StackPotDecorations> STREAM_CODEC
-
-
Constructor Details
-
StackPotDecorations
public StackPotDecorations(net.minecraft.world.item.ItemStack back, net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack right, net.minecraft.world.item.ItemStack front) -
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
-
ordered
-
addToTooltip
public void addToTooltip(net.minecraft.world.item.Item.TooltipContext context, Consumer<net.minecraft.network.chat.Component> consumer, net.minecraft.world.item.TooltipFlag flag, net.minecraft.core.component.DataComponentGetter components) - Specified by:
addToTooltipin interfacenet.minecraft.world.item.component.TooltipProvider
-
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). -
hashCode
-
toString
-
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
-