Package net.minecraft.component.type
Record Class FireworksComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.FireworksComponent
- Record Components:
flightDuration-explosions-
- All Implemented Interfaces:
TooltipAppender
public record FireworksComponent(int flightDuration, List<FireworkExplosionComponent> explosions)
extends Record
implements TooltipAppender
- Mappings:
Namespace Name named net/minecraft/component/type/FireworksComponentintermediary net/minecraft/class_9284official daenamed flightDurationintermediary comp_2391official dnamed explosionsintermediary comp_2392official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FireworksComponent> private final List<FireworkExplosionComponent> The field for theexplosionsrecord component.private final intThe field for theflightDurationrecord component.static final intstatic final PacketCodec<ByteBuf, FireworksComponent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type) final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplosionsrecord component.intReturns the value of theflightDurationrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
flightDuration
private final int flightDurationThe field for theflightDurationrecord component. -
explosions
The field for theexplosionsrecord component. -
MAX_EXPLOSIONS
public static final int MAX_EXPLOSIONS- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_EXPLOSIONSLnet/minecraft/component/type/FireworksComponent;MAX_EXPLOSIONS:Iintermediary field_49325Lnet/minecraft/class_9284;field_49325:Iofficial aLdae;a:I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/FireworksComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49323Lnet/minecraft/class_9284;field_49323:Lcom/mojang/serialization/Codec;official bLdae;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/FireworksComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49324Lnet/minecraft/class_9284;field_49324:Lnet/minecraft/class_9139;official cLdae;c:Lzt;
-
-
Constructor Details
-
FireworksComponent
-
-
Method Details
-
appendTooltip
- Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/tooltip/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vofficial aLdar;a(Lcxk$b;Ljava/util/function/Consumer;Lczg;)V
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
flightDuration
public int flightDuration()Returns the value of theflightDurationrecord component.- Returns:
- the value of the
flightDurationrecord component
-
explosions
Returns the value of theexplosionsrecord component.- Returns:
- the value of the
explosionsrecord component
-