1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 11:15:51 +00:00

[ci skip] ❇️ feat(SlimefunItem): Add constructor that takes ItemGroup and SlimefunItemStack (#4179)

This commit is contained in:
ProfElements 2024-08-08 11:36:36 -05:00 committed by GitHub
parent 6f2a5810c8
commit d25f22439e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,6 +160,21 @@ public class SlimefunItem implements Placeable {
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) {