Record Class PotDecorations
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.PotDecorations
- All Implemented Interfaces:
TooltipProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thebackrecord component.static final com.mojang.serialization.Codec<PotDecorations> static final PotDecorationsThe field for thefrontrecord component.The field for theleftrecord component.The field for therightrecord component.static final StreamCodec<RegistryFriendlyByteBuf, PotDecorations> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddSideDetailsToTooltip(Consumer<Component> consumer, Optional<Item> side) voidaddToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) back()Returns the value of thebackrecord component.final booleanIndicates whether some other object is "equal to" this one.front()Returns the value of thefrontrecord component.final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.ordered()right()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
back
-
left
-
right
-
front
-
EMPTY
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
PotDecorations
-
PotDecorations
-
PotDecorations
public PotDecorations(Optional<Item> back, Optional<Item> left, Optional<Item> right, Optional<Item> front) Creates an instance of aPotDecorationsrecord 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
-
getItem
-
ordered
-
addToTooltip
public void addToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) - Specified by:
addToTooltipin interfaceTooltipProvider
-
addSideDetailsToTooltip
-
toString
-
hashCode
-
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
-
left
-
right
-
front
-