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));
	}
	
}

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.eventbus.api.IEventBus;
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));
	}
	
	public void register(IEventBus bus) {
		register.register(bus);
	}
	
	public CommonDeferredRegister<EntityType<?>> getRegister() {
		return register;
	}
	
}

Add a register method and a getRegister Method
Add a register method and a getRegister Method