Package vazkii.botania.common.component
Record Class WandOfTheForestComponent
java.lang.Object
java.lang.Record
vazkii.botania.common.component.WandOfTheForestComponent
- All Implemented Interfaces:
AdvancedTooltipProvider
public record WandOfTheForestComponent(WandOfTheForestComponent.WandMode wandMode, TooltipVisibility tooltipVisibility)
extends Record
implements AdvancedTooltipProvider
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<WandOfTheForestComponent> static net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, WandOfTheForestComponent> -
Constructor Summary
ConstructorsConstructorDescriptionWandOfTheForestComponent(WandOfTheForestComponent.WandMode wandMode, TooltipVisibility tooltipVisibility) Creates an instance of aWandOfTheForestComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTooltip(net.minecraft.world.item.Item.TooltipContext context, Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.TooltipFlag tooltipFlag, List<net.minecraft.network.chat.Component> fullTooltip) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetooltipVisibilityrecord component.final StringtoString()Returns a string representation of this record class.wandMode()Returns the value of thewandModerecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,WandOfTheForestComponent> STREAM_CODEC
-
-
Constructor Details
-
WandOfTheForestComponent
public WandOfTheForestComponent(WandOfTheForestComponent.WandMode wandMode, TooltipVisibility tooltipVisibility) Creates an instance of aWandOfTheForestComponentrecord class.- Parameters:
wandMode- the value for thewandModerecord componenttooltipVisibility- the value for thetooltipVisibilityrecord component
-
-
Method Details
-
addToTooltip
public void addToTooltip(net.minecraft.world.item.Item.TooltipContext context, Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.TooltipFlag tooltipFlag, List<net.minecraft.network.chat.Component> fullTooltip) - Specified by:
addToTooltipin interfaceAdvancedTooltipProvider
-
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). -
wandMode
Returns the value of thewandModerecord component.- Returns:
- the value of the
wandModerecord component
-
tooltipVisibility
Returns the value of thetooltipVisibilityrecord component.- Returns:
- the value of the
tooltipVisibilityrecord component
-