diff --git a/src/main/java/net/minestom/server/item/metadata/FireworkEffectMeta.java b/src/main/java/net/minestom/server/item/metadata/FireworkEffectMeta.java index 8d6cadb77..abdd59781 100644 --- a/src/main/java/net/minestom/server/item/metadata/FireworkEffectMeta.java +++ b/src/main/java/net/minestom/server/item/metadata/FireworkEffectMeta.java @@ -5,14 +5,14 @@ import net.minestom.server.item.firework.FireworkEffect; import net.minestom.server.tag.Tag; import net.minestom.server.tag.TagHandler; import net.minestom.server.tag.TagReadable; +import net.minestom.server.tag.TagSerializer; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.UnknownNullability; -import org.jglrxavpok.hephaistos.nbt.NBTCompound; public record FireworkEffectMeta(TagReadable readable) implements ItemMetaView { - private static final Tag FIREWORK_EFFECT = Tag.NBT("Explosion") - .map(nbt -> FireworkEffect.fromCompound((NBTCompound) nbt), FireworkEffect::asCompound); + private static final Tag FIREWORK_EFFECT = Tag.Structure("Explosion", + TagSerializer.fromCompound(FireworkEffect::fromCompound, FireworkEffect::asCompound)); public @Nullable FireworkEffect getFireworkEffect() { return getTag(FIREWORK_EFFECT);