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.recipeserializer.USpecialRecipeSerializer;
import info.u_team.u_team_core.util.registry.BaseRegistryUtil;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;

@EventBusSubscriber(modid = UCoreMain.MODID, bus = Bus.MOD)
public class UCoreRecipeSerializers {
	
	public static final USpecialRecipeSerializer<DyeableItemDyeRecipe> CRAFTING_SPECIAL_ITEMDYE = new USpecialRecipeSerializer<>("crafting_special_itemdye", DyeableItemDyeRecipe::new);
	
	public static final NoMirrorShapedRecipe.Serializer NO_MIRROR_SHAPED = new NoMirrorShapedRecipe.Serializer("crafting_shaped_no_mirror");
	
	@SubscribeEvent
	public static void register(Register<IRecipeSerializer<?>> event) {
		BaseRegistryUtil.getAllGenericRegistryEntriesAndApplyNames(UCoreMain.MODID, IRecipeSerializer.class).forEach(event.getRegistry()::register);
		CraftingHelper.register(new ResourceLocation(UCoreMain.MODID, "item"), ItemIngredient.Serializer.INSTANCE);
	}
	
}

@@ -85,66 +85,8 @@
 in;%0A
-import info.u_team.u_team_core.ingredient.ItemIngredient;%0A
 impo
@@ -207,71 +207,8 @@
 er;%0A
-import info.u_team.u_team_core.util.registry.BaseRegistryUtil;%0A
 impo
@@ -261,166 +261,8 @@
 er;%0A
-import net.minecraft.util.ResourceLocation;%0Aimport net.minecraftforge.common.crafting.CraftingHelper;%0Aimport net.minecraftforge.event.RegistryEvent.Register;%0A
 impo
@@ -296,30 +296,25 @@
 bus.api.
-Subscribe
+I
 Event
+Bus
 ;%0Aimport
@@ -432,16 +432,56 @@
 ber.Bus;
+%0Aimport net.minecraftforge.registries.*;
 %0A%0A@Event
@@ -574,16 +574,177 @@
 ers %7B%0A%09%0A
+%09public static final DeferredRegister%3CIRecipeSerializer%3C?%3E%3E RECIPE_SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, UCoreMain.MODID);%0A%09%0A
 %09public 
@@ -1059,16 +1059,105 @@
 or%22);%0A%09%0A
+%09public static void register(IEventBus bus) %7B%0A%09%09RECIPE_SERIALIZERS.register(bus);%0A%09%7D%0A%09%0A//
 %09@Subscr
@@ -1165,16 +1165,18 @@
 beEvent%0A
+//
 %09public 
@@ -1236,16 +1236,18 @@
 vent) %7B%0A
+//
 %09%09BaseRe
@@ -1381,16 +1381,18 @@
 ister);%0A
+//
 %09%09Crafti
@@ -1493,15 +1493,17 @@
 TANCE);%0A
+//
 %09%7D%0A%09%0A%7D%0A

Add deferred register to ucore recipe serializers