mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-01 14:07:43 +01:00
Fix FireworkEffectMeta
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
1ad6caaf8b
commit
164cf9fe2b
@ -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<FireworkEffectMeta.Builder> {
|
||||
private static final Tag<FireworkEffect> FIREWORK_EFFECT = Tag.NBT("Explosion")
|
||||
.map(nbt -> FireworkEffect.fromCompound((NBTCompound) nbt), FireworkEffect::asCompound);
|
||||
private static final Tag<FireworkEffect> FIREWORK_EFFECT = Tag.Structure("Explosion",
|
||||
TagSerializer.fromCompound(FireworkEffect::fromCompound, FireworkEffect::asCompound));
|
||||
|
||||
public @Nullable FireworkEffect getFireworkEffect() {
|
||||
return getTag(FIREWORK_EFFECT);
|
||||
|
Loading…
Reference in New Issue
Block a user