package protocolsupport.protocol.packet.middle.clientbound.play;

import java.util.ArrayList;

import io.netty.buffer.ByteBuf;
import protocolsupport.protocol.packet.middle.ClientBoundMiddlePacket;
import protocolsupport.protocol.serializer.MiscSerializer;
import protocolsupport.protocol.serializer.VarNumberSerializer;
import protocolsupport.protocol.typeremapper.id.IdSkipper;
import protocolsupport.protocol.utils.types.Particle;

public abstract class MiddleWorldParticle extends ClientBoundMiddlePacket {

//TODO: structure
	protected Particle type;
	protected boolean longdist;
	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<Object> adddata = new ArrayList<>();

	@Override
	public void readFromServerData(ByteBuf serverdata) {
//		type = Particle.getById(serverdata.readInt());
//		longdist = serverdata.readBoolean();
//		x = serverdata.readFloat();
//		y = serverdata.readFloat();
//		z = serverdata.readFloat();
//		offX = serverdata.readFloat();
//		offY = serverdata.readFloat();
//		offZ = serverdata.readFloat();
//		speed = serverdata.readFloat();
//		count = serverdata.readInt();
//		adddata.clear();
	}

	@Override
	public boolean postFromServerRead() {
		return true;//!IdSkipper.PARTICLE.getTable(connection.getVersion()).shouldSkip(type);
	}

}

@@ -63,37 +63,8 @@
 y;%0A%0A
-import java.util.ArrayList;%0A%0A
 impo
@@ -224,185 +224,8 @@
 zer;
-%0Aimport protocolsupport.protocol.serializer.VarNumberSerializer;%0Aimport protocolsupport.protocol.typeremapper.id.IdSkipper;%0Aimport protocolsupport.protocol.utils.types.Particle;
 %0A%0Apu
@@ -317,16 +317,18 @@
 ructure%0A
+//
 %09protect
@@ -345,16 +345,18 @@
 e type;%0A
+//
 %09protect
@@ -376,16 +376,18 @@
 ngdist;%0A
+//
 %09protect
@@ -398,16 +398,18 @@
 loat x;%0A
+//
 %09protect
@@ -420,16 +420,18 @@
 loat y;%0A
+//
 %09protect
@@ -442,16 +442,18 @@
 loat z;%0A
+//
 %09protect
@@ -467,16 +467,18 @@
 t offX;%0A
+//
 %09protect
@@ -492,16 +492,18 @@
 t offY;%0A
+//
 %09protect
@@ -517,16 +517,18 @@
 t offZ;%0A
+//
 %09protect
@@ -543,16 +543,18 @@
  speed;%0A
+//
 %09protect
@@ -567,16 +567,18 @@
  count;%0A
+//
 %09protect
@@ -626,16 +626,40 @@
 ist%3C%3E();
+%0A%09protected byte%5B%5D data;
 %0A%0A%09@Over
@@ -1101,16 +1101,66 @@
 lear();%0A
+%09%09data = MiscSerializer.readAllBytes(serverdata);%0A
 %09%7D%0A%0A%09@Ov

Fix compile error