package info.u_team.u_team_test.init;

import java.awt.Color;

import info.u_team.u_team_test.TestMod;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ColorHandlerEvent;
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, value = Dist.CLIENT)
public class TestColors {
	
	@SubscribeEvent
	public static void register(ColorHandlerEvent.Item event) {
		// This use the awt color class. Might not work but was too lazy to write an own color class.
		event.getItemColors().register((stack, index) -> Color.getHSBColor((float) stack.getDamage() / (float) stack.getMaxDamage(), 0.8F, 0.5F).getRGB(), TestItems.BASIC.get());
	}
}

@@ -60,95 +60,8 @@
 r;%0A%0A
-import info.u_team.u_team_test.TestMod;%0Aimport net.minecraftforge.api.distmarker.Dist;%0A
 impo
@@ -157,229 +157,19 @@
 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, value = Dist.CLIENT)
+IEventBus;%0A
 %0Apub
@@ -198,31 +198,15 @@
 %0A%09%0A%09
-@SubscribeEvent%0A%09public
+private
  sta
@@ -214,24 +214,25 @@
 ic void 
-register
+colorItem
 (ColorHa
@@ -528,10 +528,106 @@
 ());%0A%09%7D%0A
+%09%0A%09public static void registerMod(IEventBus bus) %7B%0A%09%09bus.addListener(TestColors::colorItem);%0A%09%7D%0A
 %7D%0A

Update test colors to the new system