package info.u_team.u_team_core.util.registry;

import java.util.function.Supplier;

import net.minecraft.entity.*;
import net.minecraft.entity.EntityType.Builder;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.ForgeRegistries;

public class EntityTypeDeferredRegister {
	
	public static EntityTypeDeferredRegister create(String modid) {
		return new EntityTypeDeferredRegister(modid);
	}
	
	private final CommonDeferredRegister<EntityType<?>> register;
	
	protected EntityTypeDeferredRegister(String modid) {
		register = CommonDeferredRegister.create(ForgeRegistries.ENTITIES, modid);
	}
	
	public <E extends Entity, B extends Builder<E>> RegistryObject<EntityType<E>> register(String name, Supplier<? extends B> supplier) {
		return register.register(name, () -> supplier.get().build(register.getModid() + ":" + name));
	}
	
}

@@ -157,16 +157,66 @@
 uilder;%0A
+import net.minecraftforge.eventbus.api.IEventBus;%0A
 import n
@@ -907,10 +907,166 @@
 );%0A%09%7D%0A%09%0A
+%09public void register(IEventBus bus) %7B%0A%09%09register.register(bus);%0A%09%7D%0A%09%0A%09public CommonDeferredRegister%3CEntityType%3C?%3E%3E getRegister() %7B%0A%09%09return register;%0A%09%7D%0A%09%0A
 %7D%0A

Add a register method and a getRegister Method