package protocolsupport.protocol.transformer.middlepacket.clientbound.play;

import java.io.IOException;
import java.util.ArrayList;

import protocolsupport.protocol.PacketDataSerializer;
import protocolsupport.protocol.storage.LocalStorage;
import protocolsupport.protocol.transformer.middlepacket.ClientBoundMiddlePacket;

public abstract class MiddleWorldParticle<T> extends ClientBoundMiddlePacket<T> {

	protected int type;
	protected float x;
	protected float y;
	protected float z;
	protected float offX;
	protected float offY;
	protected float offZ;
	protected float speed;
	protected int count;
	protected ArrayList<Integer> adddata = new ArrayList<Integer>();

	@Override
	public void readFromServerData(PacketDataSerializer serializer) throws IOException {
		type = serializer.readInt();
		x = serializer.readFloat();
		y = serializer.readFloat();
		z = serializer.readFloat();
		offX = serializer.readFloat();
		offY = serializer.readFloat();
		offZ = serializer.readFloat();
		speed = serializer.readFloat();
		count = serializer.readInt();
		while (serializer.isReadable()) {
			adddata.add(serializer.readVarInt());
		}
	}

	@Override
	public void handle(LocalStorage storage) {
	}

}

@@ -422,16 +422,45 @@
 t type;%0A
+%09protected boolean longdist;%0A
 %09protect
@@ -821,16 +821,55 @@
 dInt();%0A
+%09%09longdist = serializer.readBoolean();%0A
 %09%09x = se

Fix particle packet reading