public static final void addPacket(Class<? extends Packet> packet, int id) {
		if (packets[id] != null)
			throw new IllegalArgumentException("packet id collision: " + id);
		for (int i = 0; i < packets.length; i++)
			if (packets[i].equals(packet))
				break;
		packets[id] = packet;
	}