Skip to content

Commit

Permalink
❇️ feat(SlimefunItem): Add constructor that takes ItemGroup and `Sl…
Browse files Browse the repository at this point in the history
…imefunItemStack`
  • Loading branch information
ProfElements committed Apr 29, 2024
1 parent 45601c8 commit 58699d2
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 58699d2

Please sign in to comment.