package info.u_team.u_team_core.util.registry;

import java.util.function.Supplier;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.*;

public class BlockDeferredRegister {
	
	public final DeferredRegister<Block> blocks;
	public final DeferredRegister<Item> items;
	
	public BlockDeferredRegister(String modid) {
		blocks = DeferredRegister.create(ForgeRegistries.BLOCKS, modid);
		items = DeferredRegister.create(ForgeRegistries.ITEMS, modid);
	}
	
	public <I extends Block> RegistryObject<I> registerCommon(String name, Supplier<? extends I> supplier) {
		return blocks.register(name, supplier);
	}
	
}

@@ -144,16 +144,66 @@
 m.Item;%0A
+import net.minecraftforge.eventbus.api.IEventBus;%0A
 import n
@@ -748,10 +748,101 @@
 );%0A%09%7D%0A%09%0A
+%09public void register(IEventBus bus) %7B%0A%09%09blocks.register(bus);%0A%09%09items.register(bus);%0A%09%7D%0A%09%0A
 %7D%0A

Add register method