Record Class Bees
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.Bees
- All Implemented Interfaces:
TooltipProvider
public record Bees(List<BeehiveBlockEntity.Occupant> bees)
extends Record
implements TooltipProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<BeehiveBlockEntity.Occupant> The field for thebeesrecord component.static final com.mojang.serialization.Codec<Bees> static final Beesstatic final StreamCodec<RegistryFriendlyByteBuf, Bees> -
Constructor Summary
ConstructorsConstructorDescriptionBees(List<BeehiveBlockEntity.Occupant> bees) Creates an instance of aBeesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) bees()Returns the value of thebeesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
bees
The field for thebeesrecord component. -
CODEC
-
STREAM_CODEC
-
EMPTY
-
-
Constructor Details
-
Bees
Creates an instance of aBeesrecord class.- Parameters:
bees- the value for thebeesrecord component
-
-
Method Details
-
addToTooltip
public void addToTooltip(Item.TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components) - Specified by:
addToTooltipin interfaceTooltipProvider
-
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). -
bees
Returns the value of thebeesrecord component.- Returns:
- the value of the
beesrecord component
-