From 877f1c1fa52f1ed229b7010b45f66d0b75af56ae Mon Sep 17 00:00:00 2001 From: Siroshun09 Date: Wed, 29 May 2024 21:49:48 +0900 Subject: [PATCH] fix(versions): don't add a default firework that do not have a meta --- .../java/net/okocraft/box/version/common/item/ItemSources.java | 1 + .../java/net/okocraft/box/version/paper_1_20_5/Paper_1_20_5.java | 1 + 2 files changed, 2 insertions(+) diff --git a/versions/common/src/main/java/net/okocraft/box/version/common/item/ItemSources.java b/versions/common/src/main/java/net/okocraft/box/version/common/item/ItemSources.java index 6441a2d478..2dce5395ac 100644 --- a/versions/common/src/main/java/net/okocraft/box/version/common/item/ItemSources.java +++ b/versions/common/src/main/java/net/okocraft/box/version/common/item/ItemSources.java @@ -21,6 +21,7 @@ public final class ItemSources { public static final Predicate NOT_GOAT_HORN = Predicate.not(material -> material.name().equals("GOAT_HORN")); + public static final Predicate NOT_FIREWORK = Predicate.not(material -> material.name().equals("FIREWORK_ROCKET")); public static @NotNull Stream materials(@NotNull Registry registry) { return registry.stream() diff --git a/versions/paper-1_20_5/src/main/java/net/okocraft/box/version/paper_1_20_5/Paper_1_20_5.java b/versions/paper-1_20_5/src/main/java/net/okocraft/box/version/paper_1_20_5/Paper_1_20_5.java index b70d7c663b..d5a24cca8d 100644 --- a/versions/paper-1_20_5/src/main/java/net/okocraft/box/version/paper_1_20_5/Paper_1_20_5.java +++ b/versions/paper-1_20_5/src/main/java/net/okocraft/box/version/paper_1_20_5/Paper_1_20_5.java @@ -31,6 +31,7 @@ public final class Paper_1_20_5 { .append( ItemSources.materials(Registry.MATERIAL) .filter(ItemSources.NOT_GOAT_HORN) + .filter(ItemSources.NOT_FIREWORK) .filter(ItemSources.createEnabledItemFilter(Bukkit.getWorlds().getFirst())) .map(ItemSources::toDefaultItem) )