package info.u_team.u_team_core.util.registry;

import java.util.function.*;

import net.minecraft.client.renderer.tileentity.*;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.*;
import net.minecraft.tileentity.*;
import net.minecraftforge.api.distmarker.*;
import net.minecraftforge.fml.client.registry.*;

@OnlyIn(Dist.CLIENT)
public class ClientRegistry {
	
	public static <T extends Entity> void registerEntityRenderer(Supplier<? extends EntityType<T>> supplier, IRenderFactory<? super T> rendererFactory) {
		RenderingRegistry.registerEntityRenderingHandler(supplier.get(), rendererFactory);
	}
	
	public static <T extends TileEntity> void registerSpecialTileEntityRenderer(Supplier<? extends TileEntityType<T>> supplier, TileEntityRenderer<? super T> renderer) {
		registerSpecialTileEntityRenderer(supplier, dispatcher -> renderer);
	}
	
	public static <T extends TileEntity> void registerSpecialTileEntityRenderer(Supplier<? extends TileEntityType<T>> supplier, Function<? super TileEntityRendererDispatcher, ? extends TileEntityRenderer<? super T>> rendererFactory) {
		net.minecraftforge.fml.client.registry.ClientRegistry.bindTileEntityRenderer(supplier.get(), rendererFactory);
	}
	
	public static void registerKeybinding(KeyBinding key) {
		net.minecraftforge.fml.client.registry.ClientRegistry.registerKeyBinding(key);
	}
	
}

@@ -71,16 +71,98 @@
 ion.*;%0A%0A
+import net.minecraft.client.gui.*;%0Aimport net.minecraft.client.gui.screen.Screen;%0A
 import n
@@ -196,32 +196,32 @@
 r.tileentity.*;%0A
-
 import net.minec
@@ -276,32 +276,76 @@
 craft.entity.*;%0A
+import net.minecraft.inventory.container.*;%0A
 import net.minec
@@ -478,16 +478,16 @@
 CLIENT)%0A
-
 public c
@@ -510,16 +510,276 @@
 try %7B%0A%09%0A
+%09public static %3CM extends Container, U extends Screen & IHasContainer%3CM%3E%3E void registryScreen(Supplier%3C? extends ContainerType%3C? extends M%3E%3E supplier, ScreenManager.IScreenFactory%3CM, U%3E factory) %7B%0A%09%09ScreenManager.registerFactory(supplier.get(), factory);%0A%09%7D%0A%09%0A
 %09public 

Add registerScreen Method in the client registry with a supplier type