package info.u_team.u_team_core.intern.init;

import info.u_team.u_team_core.UCoreMod;
import info.u_team.u_team_core.ingredient.ItemIngredient;
import info.u_team.u_team_core.intern.recipe.DyeableItemDyeRecipe;
import info.u_team.u_team_core.intern.recipe.NoMirrorShapedRecipe;
import info.u_team.u_team_core.util.registry.CommonDeferredRegister;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.item.crafting.SimpleRecipeSerializer;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class UCoreRecipeSerializers {
	
	public static final CommonDeferredRegister<RecipeSerializer<?>> RECIPE_SERIALIZERS = CommonDeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, UCoreMod.MODID);
	
	public static final RegistryObject<SimpleRecipeSerializer<DyeableItemDyeRecipe>> CRAFTING_SPECIAL_ITEMDYE = RECIPE_SERIALIZERS.register("crafting_special_itemdye", () -> new SimpleRecipeSerializer<>(DyeableItemDyeRecipe::new));
	public static final RegistryObject<NoMirrorShapedRecipe.Serializer> NO_MIRROR_SHAPED = RECIPE_SERIALIZERS.register("crafting_shaped_no_mirror", NoMirrorShapedRecipe.Serializer::new);
	
	private static void registerIngredient(Register<RecipeSerializer<?>> event) {
		CraftingHelper.register(new ResourceLocation(UCoreMod.MODID, "item"), ItemIngredient.Serializer.INSTANCE);
	}
	
	public static void registerMod(IEventBus bus) {
		RECIPE_SERIALIZERS.register(bus);
		bus.addGenericListener(RecipeSerializer.class, UCoreRecipeSerializers::registerIngredient);
	}
}

@@ -576,64 +576,8 @@
 er;%0A
-import net.minecraftforge.event.RegistryEvent.Register;%0A
 impo
@@ -676,16 +676,68 @@
 stries;%0A
+import net.minecraftforge.registries.RegisterEvent;%0A
 import n
@@ -1460,39 +1460,104 @@
 ster
-%3CRecipeSerializer%3C?%3E%3E event
+Event event) %7B%0A%09%09if (event.getRegistryKey().equals(ForgeRegistries.Keys.RECIPE_SERIALIZERS)
 ) %7B%0A
+%09
 %09%09Cr
@@ -1661,16 +1661,20 @@
 TANCE);%0A
+%09%09%7D%0A
 %09%7D%0A%09%0A%09pu
@@ -1768,15 +1768,8 @@
 .add
-Generic
 List
@@ -1777,32 +1777,8 @@
 ner(
-RecipeSerializer.class, 
 UCor

Fix registry of ingredient