Use String key for RecipeCatalyst instead of IRecipeHandler.class (#197)

* Use String key for RecipeCatalyst instead of IRecipeHandler.class

* deprecate old methods

* delete commented out code
This commit is contained in:
miozune authored and GitHub committed 2022-01-22 23:37:54 +01:00
1 parent caebccc1fd
commit c73edaa72e
7 files changed
+91 -25

No files matched your search

@@ -442,6 +442,7 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
*
* @return The overlay identifier of this recipe type.
*/
@Override
public String getOverlayIdentifier() {
return null;
}
@@ -559,7 +560,7 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
TemplateRecipeHandler handler = newInstance();
if (inputId.equals("item")) {
ItemStack candidate = (ItemStack) ingredients[0];
if (RecipeCatalysts.containsCatalyst(handler.getClass(), candidate)) {
if (RecipeCatalysts.containsCatalyst(handler, candidate)) {
for (RecipeTransferRect rect : transferRects) {
if (specifyTransferRect() == null || Objects.equals(rect.outputId, specifyTransferRect())) {
handler.loadCraftingRecipes(rect.outputId, rect.results);