Register InfusionRecipe Type

This commit is contained in:
Frank 2023-04-29 15:16:35 +02:00
parent 89e6b2348e
commit c8790686a4
2 changed files with 7 additions and 2 deletions

View file

@ -8,6 +8,7 @@ import org.betterx.betterend.commands.CommandRegistry;
import org.betterx.betterend.config.Configs;
import org.betterx.betterend.effects.EndPotions;
import org.betterx.betterend.integration.Integrations;
import org.betterx.betterend.recipe.builders.InfusionRecipe;
import org.betterx.betterend.registry.*;
import org.betterx.betterend.util.BonemealPlants;
import org.betterx.betterend.util.LootTableUtil;
@ -46,6 +47,7 @@ public class BetterEnd implements ModInitializer {
EndItems.ensureStaticallyLoaded();
EndEnchantments.register();
EndPotions.register();
InfusionRecipe.register();
EndStructures.register();
BonemealPlants.init();
GeneratorOptions.init();

View file

@ -272,8 +272,7 @@ public class InfusionRecipe implements Recipe<InfusionRitual>, UnknownReceipBook
}
} else if (el.isJsonArray()) {
//this is an Ingredient-Array, so read as such
JsonObject o = el.getAsJsonObject();
return ItemUtil.fromJsonIngredientWithNBT(o);
return Ingredient.fromJson(el);
} else if (obj.isJsonPrimitive()) {
String s = GsonHelper.getAsString(obj, key, "");
ItemStack catalyst = ItemUtil.fromStackString(s);
@ -333,4 +332,8 @@ public class InfusionRecipe implements Recipe<InfusionRitual>, UnknownReceipBook
}
}
}
public static void register() {
//we call this to make sure that TYPE is initialized
}
}