Record Class PotDecorations
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.PotDecorations
- All Implemented Interfaces:
TooltipProvider
public record PotDecorations(Optional<ItemStackTemplate> back, Optional<ItemStackTemplate> left, Optional<ItemStackTemplate> right, Optional<ItemStackTemplate> front)
extends Record
implements TooltipProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface TooltipProvider
TooltipProvider.Getter<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<ItemStackTemplate> The field for thebackrecord component.static final com.mojang.serialization.Codec<PotDecorations> static final PotDecorationsprivate final Optional<ItemStackTemplate> The field for thefrontrecord component.private final Optional<ItemStackTemplate> The field for theleftrecord component.private final Optional<ItemStackTemplate> The field for therightrecord component.static final StreamCodec<RegistryFriendlyByteBuf, PotDecorations> -
Constructor Summary
ConstructorsConstructorDescriptionPotDecorations(Optional<ItemStackTemplate> back, Optional<ItemStackTemplate> left, Optional<ItemStackTemplate> right, Optional<ItemStackTemplate> front) Creates an instance of aPotDecorationsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddSideDetailsToTooltip(Consumer<Component> consumer, Optional<ItemStackTemplate> side) voidaddToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) static PotDecorationsallBrick(HolderGetter<Item> items) 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.right()Returns the value of therightrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
back
The field for thebackrecord component. -
left
The field for theleftrecord component. -
right
The field for therightrecord component. -
front
The field for thefrontrecord component. -
EMPTY
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
PotDecorations
public PotDecorations(Optional<ItemStackTemplate> back, Optional<ItemStackTemplate> left, Optional<ItemStackTemplate> right, Optional<ItemStackTemplate> 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
-
allBrick
-
addToTooltip
public void addToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) - Specified by:
addToTooltipin interfaceTooltipProvider
-
addSideDetailsToTooltip
private static void addSideDetailsToTooltip(Consumer<Component> consumer, Optional<ItemStackTemplate> side) -
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
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
-