package info.u_team.u_team_test.init;

import info.u_team.u_team_core.item.armor.*;
import info.u_team.u_team_core.item.tool.*;
import info.u_team.u_team_core.util.registry.BaseRegistryUtil;
import info.u_team.u_team_test.TestMod;
import info.u_team.u_team_test.item.*;
import net.minecraft.item.Item;
import net.minecraft.item.Item.Properties;
import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;

@EventBusSubscriber(modid = TestMod.MODID, bus = Bus.MOD)
public class TestItems {
	
	public static final Item BASIC = new BasicItem("basicitem");
	
	public static final Item BETTER_ENDERPEARL = new BetterEnderPearlItem("better_enderpearl");
	
	public static final Item BASIC_FOOD = new BasicFoodItem("basicfood");
	
	public static final ToolSet BASIC_TOOL = ToolSetCreator.create("basictool", TestItemGroups.GROUP, new Properties(), TestToolMaterial.BASIC);
	public static final ArmorSet BASIC_ARMOR = ArmorSetCreator.create("basicarmor", TestItemGroups.GROUP, new Properties(), TestArmorMaterial.BASIC);
	
	@SubscribeEvent
	public static void registerBlockItem(Register<Item> event) {
		BaseRegistryUtil.getAllRegistryEntriesAndApplyNames(TestMod.MODID, Item.class).forEach(event.getRegistry()::register);
	}
	
}

@@ -125,71 +125,8 @@
 .*;%0A
-import info.u_team.u_team_core.util.registry.BaseRegistryUtil;%0A
 impo
@@ -310,31 +310,25 @@
 vent
-.RegistryEvent.Register
+bus.api.IEventBus
 ;%0Aim
@@ -355,246 +355,164 @@
 rge.
-eventbus.api.SubscribeEvent;%0Aimport net.minecraftforge.fml.common.Mod.EventBusSubscriber;%0Aimport net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;%0A%0A@EventBusSubscriber(modid = TestMod.MODID, bus = Bus.MOD)%0Apublic class TestItems %7B
+registries.*;%0A%0Apublic class TestItems %7B%0A%09%0A%09public static final DeferredRegister%3CItem%3E ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, TestMod.MODID);
 %0A%09%0A%09
@@ -1037,25 +1037,8 @@
 ;%0A%09%0A
-%09@SubscribeEvent%0A
 %09pub
@@ -1065,166 +1065,50 @@
 ster
-BlockItem(Register%3CItem%3E event) %7B%0A%09%09BaseRegistryUtil.getAllRegistryEntriesAndApplyNames(TestMod.MODID, Item.class).forEach(event.getRegistry()::register
+(IEventBus bus) %7B%0A%09%09ITEMS.register(bus
 );%0A%09%7D%0A
-%09%0A
 %7D%0A

Add deferred register to items