Skip to content

Commit 1a8e073

Browse files
committed
Add javadocs to new API method
1 parent 4b81e47 commit 1a8e073

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/api/java/mekanism/api/MekanismAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private MekanismAPI() {
3434
/**
3535
* The version of the api classes - may not always match the mod's version
3636
*/
37-
public static final String API_VERSION = "10.6.6";
37+
public static final String API_VERSION = "10.6.7";
3838
/**
3939
* Mekanism's Mod ID
4040
*/

src/api/java/mekanism/api/recipes/ingredients/creator/IItemStackIngredientCreator.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ default ItemStackIngredient from(SizedIngredient ingredient) {
200200
return ItemStackIngredient.of(ingredient);
201201
}
202202

203+
/**
204+
* Creates an Item Stack Ingredient from a holder lookup given the item's id.
205+
*
206+
* @param registries Holder lookup to find the item in.
207+
* @param itemId Item ID of the item to look up.
208+
*
209+
* @throws NullPointerException if the given registries or item id are null.
210+
* @throws IllegalStateException if the item does not exist.
211+
* @since 10.6.7
212+
*/
203213
default ItemStackIngredient from(HolderLookup.Provider registries, ResourceLocation itemId) {
204214
return fromHolder(registries.lookupOrThrow(Registries.ITEM).getOrThrow(ResourceKey.create(Registries.ITEM, itemId)));
205215
}

0 commit comments

Comments
 (0)