package techreborn.events;

import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import tconstruct.armor.ArmorTickHandler;
import techreborn.api.TechRebornItems;
import techreborn.init.ModItems;
import techreborn.items.tools.ItemCloakingDevice;

public class TRTickHandler extends TickEvent {
	public TRTickHandler(Type type, Side side, Phase phase) {
		super(type, side, phase);
		
	}
	public Item previouslyWearing;
	@SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
	public void onPlayerTick(TickEvent.PlayerTickEvent e) {
		EntityPlayer player = e.player;
		Item chestslot = player.getEquipmentInSlot(3) != null ? player.getEquipmentInSlot(3).getItem() : null;
		
		if(previouslyWearing != chestslot && previouslyWearing == ModItems.cloakingDevice && player.isInvisible())
			player.setInvisible(false);
		previouslyWearing = chestslot;
	}

	
}

@@ -184,72 +184,8 @@
 nt;%0A
-import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;%0A
 impo
@@ -310,162 +310,31 @@
 rt t
-construct.armor.ArmorTickHandler;%0Aimport techreborn.api.TechRebornItems;%0Aimport techreborn.init.ModItems;%0Aimport techreborn.items.tools.ItemCloakingDevice
+echreborn.init.ModItems
 ;%0A%0Ap
@@ -750,16 +750,17 @@
 InSlot(3
+v
 ).getIte

remove random import