<commit_before>package com.ForgeEssentials.client.network;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;

import com.ForgeEssentials.util.OutputHandler;

import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class PacketHandler implements IPacketHandler
{
	@Override
	public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerFake)
	{
		try
		{
			ByteArrayInputStream streambyte = new ByteArrayInputStream(packet.data);
			DataInputStream stream = new DataInputStream(streambyte);

			EntityPlayer player = (EntityPlayer) playerFake;
			WorldClient world = (WorldClient) player.worldObj;

			int ID = stream.read();
			
			OutputHandler.felog.finest("Received packet with ID " + ID);

			switch (ID)
				{
				// cast to the correct instance of ForgeEssentialsPacketbase and use
				// the read methods.
					case 0:
						PacketSelectionUpdate.readClient(stream, world, player);
						break;
					case 1:
						PacketPlayerLogger.readClient(stream, world, player);
						break;
					case 2:
					    PacketRollback.readClient(stream, world, player);
					    break;
					case 3:
						PacketPermNodeList.readClient(stream, world, player);
						break;<commit_msg>Close #853 - definitely not my derp<commit_after>package com.ForgeEssentials.client.network;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;

import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;

import com.ForgeEssentials.client.ForgeEssentialsClient;

import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class PacketHandler implements IPacketHandler
{
	@Override
	public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerFake)
	{
		try
		{
			ByteArrayInputStream streambyte = new ByteArrayInputStream(packet.data);
			DataInputStream stream = new DataInputStream(streambyte);

			EntityPlayer player = (EntityPlayer) playerFake;
			WorldClient world = (WorldClient) player.worldObj;

			int ID = stream.read();
			
			ForgeEssentialsClient.feclientlog.finest("Received packet with ID " + ID);

			switch (ID)
				{
				// cast to the correct instance of ForgeEssentialsPacketbase and use
				// the read methods.
					case 0:
						PacketSelectionUpdate.readClient(stream, world, player);
						break;
					case 1:
						PacketPlayerLogger.readClient(stream, world, player);
						break;
					case 2:
					    PacketRollback.readClient(stream, world, player);
					    break;
					case 3:
						PacketPermNodeList.readClient(stream, world, player);
						break;
{'fraction_non_alphanumeric': 0.0884459669884771, 'fraction_numerical': 0.0071628776082217375, 'mean_word_length': 4.326699834162521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2371794', 'n_tokens_mistral': 1141, 'n_tokens_neox': 947, 'n_words': 208}