package info.u_team.u_team_core.intern.init;

import info.u_team.u_team_core.UCoreMain;
import info.u_team.u_team_core.ingredient.ItemIngredient;
import info.u_team.u_team_core.intern.recipe.*;
import info.u_team.u_team_core.util.registry.CommonDeferredRegister;
import net.minecraft.item.crafting.*;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.*;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.registries.ForgeRegistries;

@EventBusSubscriber(modid = UCoreMain.MODID, bus = Bus.MOD)
public class UCoreRecipeSerializers {
	
	public static final CommonDeferredRegister<IRecipeSerializer<?>> RECIPE_SERIALIZERS = CommonDeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, UCoreMain.MODID);
	
	public static final RegistryObject<SpecialRecipeSerializer<DyeableItemDyeRecipe>> CRAFTING_SPECIAL_ITEMDYE = RECIPE_SERIALIZERS.register("crafting_special_itemdye", () -> new SpecialRecipeSerializer<>(DyeableItemDyeRecipe::new));
	
	public static final RegistryObject<NoMirrorShapedRecipe.Serializer> NO_MIRROR_SHAPED = RECIPE_SERIALIZERS.register("crafting_shaped_no_mirror", NoMirrorShapedRecipe.Serializer::new);
	
	public static void register(IEventBus bus) {
		RECIPE_SERIALIZERS.register(bus);
	}
	
	@SubscribeEvent
	public static void register(Register<IRecipeSerializer<?>> event) {
		CraftingHelper.register(new ResourceLocation(UCoreMain.MODID, "item"), ItemIngredient.Serializer.INSTANCE);
	}
	
}

@@ -491,17 +491,25 @@
 bus.api.
-*
+IEventBus
 ;%0Aimport
@@ -578,222 +578,36 @@
 rge.
-fml.common.Mod.EventBusSubscriber;%0Aimport net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;%0Aimport net.minecraftforge.registries.ForgeRegistries;%0A%0A@EventBusSubscriber(modid = UCoreMain.MODID, bus = Bus.MOD)
+registries.ForgeRegistries;%0A
 %0Apub
@@ -1322,36 +1322,115 @@
 );%0A%09
-%7D%0A%09%0A%09@SubscribeEvent%0A%09public
+%09bus.addGenericListener(IRecipeSerializer.class, UCoreRecipeSerializers::registerIngredient);%0A%09%7D%0A%09%0A%09private
  sta
@@ -1446,16 +1446,26 @@
 register
+Ingredient
 (Registe
@@ -1610,12 +1610,10 @@
 CE);%0A%09%7D%0A
-%09%0A
 %7D%0A

Use the bus register to register the ingredient