// Path: src/main/java/com/techjar/vivecraftforge/network/IPacket.java
// public interface IPacket {
// 	void encodePacket(ChannelHandlerContext context, ByteBuf buffer);
// 
// 	void decodePacket(ChannelHandlerContext context, ByteBuf buffer);
// 
// 	void handleClient(EntityPlayerSP player);
// 
// 	void handleServer(EntityPlayerMP player);
// }
// 
// Path: src/main/java/com/techjar/vivecraftforge/util/PlayerTracker.java
// public class PlayerTracker {
// 	public static Map<UUID, VRPlayerData> players = new HashMap<UUID, VRPlayerData>();
// 	public static Set<UUID> companionPlayers = new HashSet<UUID>();
// 
// 	public static void tick() {
// 		for (Iterator<Map.Entry<UUID, VRPlayerData>> it = players.entrySet().iterator(); it.hasNext();) {
// 			Map.Entry<UUID, VRPlayerData> entry = it.next();
// 			Entity entity = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(entry.getKey());
// 			if (entity == null) {
// 				it.remove();
// 			}
// 		}
// 		for (Iterator<UUID> it = companionPlayers.iterator(); it.hasNext();) {
// 			UUID uuid = it.next();
// 			Entity entity = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(uuid);
// 			if (entity == null) {
// 				it.remove();
// 			}
// 		}
// 	}
// 
// 	public static VRPlayerData getPlayerData(EntityPlayer entity) {
// 		return players.get(entity.getGameProfile().getId());
// 	}
// 
// 	public static boolean hasPlayerData(EntityPlayer entity) {
// 		return players.containsKey(entity.getGameProfile().getId());
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(UUID uuid, VRPlayerData data) {
// 		PacketHeadData headData = new PacketHeadData(data.seated, data.head.posX, data.head.posY, data.head.posZ, data.head.rotW, data.head.rotX, data.head.rotY, data.head.rotZ);
// 		PacketController0Data controller0Data = new PacketController0Data(data.handsReversed, data.controller0.posX, data.controller0.posY, data.controller0.posZ, data.controller0.rotW, data.controller0.rotX, data.controller0.rotY, data.controller0.rotZ);
// 		PacketController1Data controller1Data = new PacketController1Data(data.handsReversed, data.controller1.posX, data.controller1.posY, data.controller1.posZ, data.controller1.rotW, data.controller1.rotX, data.controller1.rotY, data.controller1.rotZ);
// 		return new PacketUberPacket(uuid, headData, controller0Data, controller1Data);
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(UUID uuid) {
// 		VRPlayerData data = players.get(uuid);
// 		if (data != null) {
// 			return getPlayerDataPacket(uuid, data);
// 		}
// 		return null;
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(EntityPlayer entity) {
// 		VRPlayerData data = players.get(entity.getGameProfile().getId());
// 		if (data != null) {
// 			getPlayerDataPacket(entity.getGameProfile().getId(), data);
// 		}
// 		return null;
// 	}
// }
// 
// Path: src/main/java/com/techjar/vivecraftforge/util/VRPlayerData.java
// public class VRPlayerData {
// 	public ObjectInfo head = new ObjectInfo();
// 	public ObjectInfo controller0 = new ObjectInfo();
// 	public ObjectInfo controller1 = new ObjectInfo();
// 	public boolean handsReversed;
// 	public float worldScale;
// 	public boolean seated;
// 	public boolean freeMove;
// 	public float bowDraw;
// 
// 	public static class ObjectInfo {
// 		public float posX;
// 		public float posY;
// 		public float posZ;
// 		public float rotW;
// 		public float rotX;
// 		public float rotY;
// 		public float rotZ;
// 	}
// }


import com.techjar.vivecraftforge.network.IPacket;
import com.techjar.vivecraftforge.util.PlayerTracker;
import com.techjar.vivecraftforge.util.VRPlayerData;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayerMP;
	@Override
	public void encodePacket(ChannelHandlerContext context, ByteBuf buffer) {
		buffer.writeBoolean(seated);
		buffer.writeFloat(posX);
		buffer.writeFloat(posY);
		buffer.writeFloat(posZ);
		buffer.writeFloat(rotW);
		buffer.writeFloat(rotX);
		buffer.writeFloat(rotY);
		buffer.writeFloat(rotZ);
	}

	@Override
	public void decodePacket(ChannelHandlerContext context, ByteBuf buffer) {
		seated = buffer.readBoolean();
		posX = buffer.readFloat();
		posY = buffer.readFloat();
		posZ = buffer.readFloat();
		rotW = buffer.readFloat();
		rotX = buffer.readFloat();
		rotY = buffer.readFloat();
		rotZ = buffer.readFloat();
	}

	@Override
	public void handleClient(EntityPlayerSP player) {
	}

	@Override
	public void handleServer(EntityPlayerMP player) {
// Path: src/main/java/com/techjar/vivecraftforge/network/IPacket.java
// public interface IPacket {
// 	void encodePacket(ChannelHandlerContext context, ByteBuf buffer);
// 
// 	void decodePacket(ChannelHandlerContext context, ByteBuf buffer);
// 
// 	void handleClient(EntityPlayerSP player);
// 
// 	void handleServer(EntityPlayerMP player);
// }
// 
// Path: src/main/java/com/techjar/vivecraftforge/util/PlayerTracker.java
// public class PlayerTracker {
// 	public static Map<UUID, VRPlayerData> players = new HashMap<UUID, VRPlayerData>();
// 	public static Set<UUID> companionPlayers = new HashSet<UUID>();
// 
// 	public static void tick() {
// 		for (Iterator<Map.Entry<UUID, VRPlayerData>> it = players.entrySet().iterator(); it.hasNext();) {
// 			Map.Entry<UUID, VRPlayerData> entry = it.next();
// 			Entity entity = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(entry.getKey());
// 			if (entity == null) {
// 				it.remove();
// 			}
// 		}
// 		for (Iterator<UUID> it = companionPlayers.iterator(); it.hasNext();) {
// 			UUID uuid = it.next();
// 			Entity entity = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(uuid);
// 			if (entity == null) {
// 				it.remove();
// 			}
// 		}
// 	}
// 
// 	public static VRPlayerData getPlayerData(EntityPlayer entity) {
// 		return players.get(entity.getGameProfile().getId());
// 	}
// 
// 	public static boolean hasPlayerData(EntityPlayer entity) {
// 		return players.containsKey(entity.getGameProfile().getId());
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(UUID uuid, VRPlayerData data) {
// 		PacketHeadData headData = new PacketHeadData(data.seated, data.head.posX, data.head.posY, data.head.posZ, data.head.rotW, data.head.rotX, data.head.rotY, data.head.rotZ);
// 		PacketController0Data controller0Data = new PacketController0Data(data.handsReversed, data.controller0.posX, data.controller0.posY, data.controller0.posZ, data.controller0.rotW, data.controller0.rotX, data.controller0.rotY, data.controller0.rotZ);
// 		PacketController1Data controller1Data = new PacketController1Data(data.handsReversed, data.controller1.posX, data.controller1.posY, data.controller1.posZ, data.controller1.rotW, data.controller1.rotX, data.controller1.rotY, data.controller1.rotZ);
// 		return new PacketUberPacket(uuid, headData, controller0Data, controller1Data);
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(UUID uuid) {
// 		VRPlayerData data = players.get(uuid);
// 		if (data != null) {
// 			return getPlayerDataPacket(uuid, data);
// 		}
// 		return null;
// 	}
// 
// 	public static PacketUberPacket getPlayerDataPacket(EntityPlayer entity) {
// 		VRPlayerData data = players.get(entity.getGameProfile().getId());
// 		if (data != null) {
// 			getPlayerDataPacket(entity.getGameProfile().getId(), data);
// 		}
// 		return null;
// 	}
// }
// 
// Path: src/main/java/com/techjar/vivecraftforge/util/VRPlayerData.java
// public class VRPlayerData {
// 	public ObjectInfo head = new ObjectInfo();
// 	public ObjectInfo controller0 = new ObjectInfo();
// 	public ObjectInfo controller1 = new ObjectInfo();
// 	public boolean handsReversed;
// 	public float worldScale;
// 	public boolean seated;
// 	public boolean freeMove;
// 	public float bowDraw;
// 
// 	public static class ObjectInfo {
// 		public float posX;
// 		public float posY;
// 		public float posZ;
// 		public float rotW;
// 		public float rotX;
// 		public float rotY;
// 		public float rotZ;
// 	}
// }


// Path: src/main/java/com/techjar/vivecraftforge/network/packet/PacketHeadData.java
import com.techjar.vivecraftforge.network.IPacket;
import com.techjar.vivecraftforge.util.PlayerTracker;
import com.techjar.vivecraftforge.util.VRPlayerData;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.EntityPlayerMP;

	@Override
	public void encodePacket(ChannelHandlerContext context, ByteBuf buffer) {
		buffer.writeBoolean(seated);
		buffer.writeFloat(posX);
		buffer.writeFloat(posY);
		buffer.writeFloat(posZ);
		buffer.writeFloat(rotW);
		buffer.writeFloat(rotX);
		buffer.writeFloat(rotY);
		buffer.writeFloat(rotZ);
	}

	@Override
	public void decodePacket(ChannelHandlerContext context, ByteBuf buffer) {
		seated = buffer.readBoolean();
		posX = buffer.readFloat();
		posY = buffer.readFloat();
		posZ = buffer.readFloat();
		rotW = buffer.readFloat();
		rotX = buffer.readFloat();
		rotY = buffer.readFloat();
		rotZ = buffer.readFloat();
	}

	@Override
	public void handleClient(EntityPlayerSP player) {
	}

	@Override
	public void handleServer(EntityPlayerMP player) {
		VRPlayerData data = PlayerTracker.getPlayerData(player);