// Path: src/main/java/buildcraftAdditions/listeners/FlightTracker.java
// public class FlightTracker {
// 	private static final HashMap<UUID, Boolean>
// 			jumpers = new HashMap<UUID, Boolean>(),
// 			movers = new HashMap<UUID, Boolean>();
// 
// 
// 	public static boolean wantsToFly(EntityPlayer player) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return false;
// 		if (!jumpers.containsKey(player.getGameProfile().getId()))
// 			jumpers.put(player.getGameProfile().getId(), false);
// 		return jumpers.get(player.getGameProfile().getId());
// 	}
// 
// 	public static boolean wantsToMove(EntityPlayer player) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return false;
// 		if (!movers.containsKey(player.getGameProfile().getId()))
// 			movers.put(player.getGameProfile().getId(), false);
// 		return movers.get(player.getGameProfile().getId());
// 	}
// 
// 	public static void setJumping(EntityPlayer player, boolean newStatus) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return;
// 		jumpers.put(player.getGameProfile().getId(), newStatus);
// 		sync(player);
// 	}
// 
// 	public static void setMoving(EntityPlayer player, boolean moving) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return;
// 		movers.put(player.getGameProfile().getId(), moving);
// 		sync(player);
// 	}
// 
// 	private static void sync(EntityPlayer player) {
// 		if (player == null || player.worldObj == null)
// 			return;
// 		if (player.worldObj.isRemote)
// 			PacketHandler.instance.sendToServer(new MessageFlightSync(wantsToFly(player), wantsToMove(player)));
// 	}
// }
// 
// Path: src/main/java/buildcraftAdditions/reference/ArmorLoader.java
// public class ArmorLoader {
// 	public static ItemArmor kineticBackpack;
// 	public static ItemArmor rocketPants;
// 	public static ItemArmor hoverBoots;
// 
// 	public static void loadArmor() {
// 		kineticBackpack = new ItemKineticBackpack();
// 		rocketPants = new ItemRocketPants();
// 		hoverBoots = new ItemHoverBoots();
// 
// 	}
// 
// 	public static void addRecipes() {
// 		GameRegistry.addRecipe(new ItemStack(kineticBackpack), "PLP", "PPP", "PPP", 'P', ItemLoader.conductivePlate, 'L', Items.leather);
// 		GameRegistry.addRecipe(new ItemStack(BlockLoader.backpackStand), "III", " I ", "III", 'I', Items.iron_ingot);
// 		GameRegistry.addRecipe(new ItemStack(rocketPants), "P P", "ITI", "T T", 'P', ItemLoader.lightPlating, 'I', Items.iron_ingot, 'T', ItemLoader.thruster);
// 		GameRegistry.addRecipe(new ItemStack(hoverBoots), "P P", "I I", "T T", 'P', ItemLoader.lightPlating, 'I', Items.iron_ingot, 'T', ItemLoader.thruster);
// 	}
// }


import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraftAdditions.client.models.ModelRocketPants;
import buildcraftAdditions.listeners.FlightTracker;
import buildcraftAdditions.reference.ArmorLoader;
import buildcraftAdditions.utils.RenderUtils;
package buildcraftAdditions.armour;




/**
 * Copyright (c) 2014-2015, AEnterprise
 * http://buildcraftadditions.wordpress.com/
 * Buildcraft Additions is distributed under the terms of GNU GPL v3.0
 * Please check the contents of the license located in
 * http://buildcraftadditions.wordpress.com/wiki/licensing-stuff/
 */
public class ItemRocketPants extends ItemPoweredArmor {
	private static final int
			MAX_LIFT = 6,
			FLY_POWER = 60,
			SPEED_POWER = 20;

	public static IIcon icon;

	public ItemRocketPants() {
		super("rocketPants", 2);
	}

	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
		setDamage(itemStack, 0);
		if (FlightTracker.wantsToFly(player) || !player.onGround) {
			ItemStack stack = player.getCurrentArmor(2);
			if (stack != null && stack.getItem() == ArmorLoader.kineticBackpack) {
				ItemKineticBackpack backpack = (ItemKineticBackpack) stack.getItem();
				if (backpack.extractEnergy(stack, 40, true) == 40) {
					if (FlightTracker.wantsToMove(player)) {
						player.moveFlying(0, .2f, .2f);
					}
					player.motionX *= 1.025;
					player.motionZ *= 1.025;
					backpack.extractEnergy(stack, SPEED_POWER, false);
// Path: src/main/java/buildcraftAdditions/listeners/FlightTracker.java
// public class FlightTracker {
// 	private static final HashMap<UUID, Boolean>
// 			jumpers = new HashMap<UUID, Boolean>(),
// 			movers = new HashMap<UUID, Boolean>();
// 
// 
// 	public static boolean wantsToFly(EntityPlayer player) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return false;
// 		if (!jumpers.containsKey(player.getGameProfile().getId()))
// 			jumpers.put(player.getGameProfile().getId(), false);
// 		return jumpers.get(player.getGameProfile().getId());
// 	}
// 
// 	public static boolean wantsToMove(EntityPlayer player) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return false;
// 		if (!movers.containsKey(player.getGameProfile().getId()))
// 			movers.put(player.getGameProfile().getId(), false);
// 		return movers.get(player.getGameProfile().getId());
// 	}
// 
// 	public static void setJumping(EntityPlayer player, boolean newStatus) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return;
// 		jumpers.put(player.getGameProfile().getId(), newStatus);
// 		sync(player);
// 	}
// 
// 	public static void setMoving(EntityPlayer player, boolean moving) {
// 		if (player == null || player.getGameProfile() == null || player.getGameProfile().getId() == null)
// 			return;
// 		movers.put(player.getGameProfile().getId(), moving);
// 		sync(player);
// 	}
// 
// 	private static void sync(EntityPlayer player) {
// 		if (player == null || player.worldObj == null)
// 			return;
// 		if (player.worldObj.isRemote)
// 			PacketHandler.instance.sendToServer(new MessageFlightSync(wantsToFly(player), wantsToMove(player)));
// 	}
// }
// 
// Path: src/main/java/buildcraftAdditions/reference/ArmorLoader.java
// public class ArmorLoader {
// 	public static ItemArmor kineticBackpack;
// 	public static ItemArmor rocketPants;
// 	public static ItemArmor hoverBoots;
// 
// 	public static void loadArmor() {
// 		kineticBackpack = new ItemKineticBackpack();
// 		rocketPants = new ItemRocketPants();
// 		hoverBoots = new ItemHoverBoots();
// 
// 	}
// 
// 	public static void addRecipes() {
// 		GameRegistry.addRecipe(new ItemStack(kineticBackpack), "PLP", "PPP", "PPP", 'P', ItemLoader.conductivePlate, 'L', Items.leather);
// 		GameRegistry.addRecipe(new ItemStack(BlockLoader.backpackStand), "III", " I ", "III", 'I', Items.iron_ingot);
// 		GameRegistry.addRecipe(new ItemStack(rocketPants), "P P", "ITI", "T T", 'P', ItemLoader.lightPlating, 'I', Items.iron_ingot, 'T', ItemLoader.thruster);
// 		GameRegistry.addRecipe(new ItemStack(hoverBoots), "P P", "I I", "T T", 'P', ItemLoader.lightPlating, 'I', Items.iron_ingot, 'T', ItemLoader.thruster);
// 	}
// }


// Path: src/main/java/buildcraftAdditions/armour/ItemRocketPants.java
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import buildcraftAdditions.client.models.ModelRocketPants;
import buildcraftAdditions.listeners.FlightTracker;
import buildcraftAdditions.reference.ArmorLoader;
import buildcraftAdditions.utils.RenderUtils;

package buildcraftAdditions.armour;




/**
 * Copyright (c) 2014-2015, AEnterprise
 * http://buildcraftadditions.wordpress.com/
 * Buildcraft Additions is distributed under the terms of GNU GPL v3.0
 * Please check the contents of the license located in
 * http://buildcraftadditions.wordpress.com/wiki/licensing-stuff/
 */
public class ItemRocketPants extends ItemPoweredArmor {
	private static final int
			MAX_LIFT = 6,
			FLY_POWER = 60,
			SPEED_POWER = 20;

	public static IIcon icon;

	public ItemRocketPants() {
		super("rocketPants", 2);
	}

	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
		setDamage(itemStack, 0);
		if (FlightTracker.wantsToFly(player) || !player.onGround) {
			ItemStack stack = player.getCurrentArmor(2);
			if (stack != null && stack.getItem() == ArmorLoader.kineticBackpack) {
				ItemKineticBackpack backpack = (ItemKineticBackpack) stack.getItem();
				if (backpack.extractEnergy(stack, 40, true) == 40) {
					if (FlightTracker.wantsToMove(player)) {
						player.moveFlying(0, .2f, .2f);
					}
					player.motionX *= 1.025;
					player.motionZ *= 1.025;
					backpack.extractEnergy(stack, SPEED_POWER, false);
					if (player.motionY < MAX_LIFT && FlightTracker.wantsToFly(player)) {