From d25f22439ec82656fda0af13136c6dccd8a539ed Mon Sep 17 00:00:00 2001 From: ProfElements <43350117+ProfElements@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:36:36 -0500 Subject: [PATCH] [ci skip] :sparkle: feat(SlimefunItem): Add constructor that takes `ItemGroup` and `SlimefunItemStack` (#4179) --- .../slimefun4/api/items/SlimefunItem.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java index 6400d8b925..ea3775037c 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/api/items/SlimefunItem.java @@ -160,6 +160,21 @@ public SlimefunItem(ItemGroup itemGroup, SlimefunItemStack item, RecipeType reci this.recipeOutput = recipeOutput; } + /** + * This creates a new {@link SlimefunItem} from the given arguments. + * + * @param itemGroup + * The {@link ItemGroup} this {@link SlimefunItem} belongs + * to + * @param item + * The {@link SlimefunItemStack} that describes the visual + * features of our {@link SlimefunItem} + */ + @ParametersAreNonnullByDefault + public SlimefunItem(ItemGroup itemGroup, SlimefunItemStack item) { + this(itemGroup, item, RecipeType.NULL, new ItemStack[] {}); + } + // Previously deprecated constructor, now only for internal purposes @ParametersAreNonnullByDefault protected SlimefunItem(ItemGroup itemGroup, ItemStack item, String id, RecipeType recipeType, ItemStack[] recipe) {