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 official cxkintermediary net/minecraft/class_9284named net/minecraft/component/type/FireworksComponentofficial dintermediary comp_2391named flightDurationofficial eintermediary comp_2392named explosions
-
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(Consumer<Text> textConsumer, TooltipContext context) 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 official aLcxk;a:Iintermediary field_49325Lnet/minecraft/class_9284;field_49325:Inamed MAX_EXPLOSIONSLnet/minecraft/component/type/FireworksComponent;MAX_EXPLOSIONS:I
-
CODEC
- Mappings:
Namespace Name Mixin selector official bLcxk;b:Lcom/mojang/serialization/Codec;intermediary field_49323Lnet/minecraft/class_9284;field_49323:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/component/type/FireworksComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official cLcxk;c:Lzc;intermediary field_49324Lnet/minecraft/class_9284;field_49324:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/component/type/FireworksComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
FireworksComponent
-
-
Method Details
-
appendTooltip
- Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector official aLcxx;a(Ljava/util/function/Consumer;Lcwi;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)Vnamed appendTooltipLnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)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
-