package info.u_team.u_team_core.intern.init;

import info.u_team.u_team_core.UCoreMod;
import info.u_team.u_team_core.intern.loot.SetTileEntityNBTLootFunction;
import net.minecraft.block.Block;
import net.minecraft.loot.LootFunctionType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.Registry;
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 = UCoreMod.MODID, bus = Bus.MOD)
public class UCoreLootTableRegistry {
	
	public static LootFunctionType SET_TILEENTITY_NBT;
	
	@SubscribeEvent
	public static void register(Register<Block> event) {
		SET_TILEENTITY_NBT = Registry.register(Registry.LOOT_FUNCTION_TYPE, new ResourceLocation(UCoreMod.MODID, "set_tileentity_nbt"), new LootFunctionType(new SetTileEntityNBTLootFunction.Serializer()));
	}
	
}

@@ -419,209 +419,19 @@
 api.
-SubscribeEvent;%0Aimport net.minecraftforge.fml.common.Mod.EventBusSubscriber;%0Aimport net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;%0A%0A@EventBusSubscriber(modid = UCoreMod.MODID, bus = Bus.MOD)
+IEventBus;%0A
 %0Apub
@@ -482,16 +482,22 @@
  static 
+final 
 LootFunc
@@ -527,36 +527,90 @@
 _NBT
-;%0A%09%0A%09@SubscribeEvent%0A%09public
+ = new LootFunctionType(new SetTileEntityNBTLootFunction.Serializer());%0A%09%0A%09private
  sta
@@ -622,24 +622,36 @@
 oid register
+LootFunction
 (Register%3CBl
@@ -666,37 +666,16 @@
 nt) %7B%0A%09%09
-SET_TILEENTITY_NBT = 
 Registry
@@ -777,81 +777,169 @@
 %22), 
-new LootFunctionType(new SetTileEntityNBTLootFunction.Serializer())
+SET_TILEENTITY_NBT);%0A%09%7D%0A%09%0A%09public static void registerMod(IEventBus bus) %7B%0A%09%09bus.addGenericListener(Block.class, UCoreLootTableRegistry::registerLootFunction
 );%0A%09%7D%0A
-%09%0A
 %7D%0A

Update loot table register to the new system