use of com.viaversion.viaversion.api.type.types.Particle in project ViaVersion by ViaVersion.
the class ParticleType method read.
@Override
public Particle read(final ByteBuf buffer) throws Exception {
final int type = Type.VAR_INT.readPrimitive(buffer);
final Particle particle = new Particle(type);
final ParticleReader reader = readers.get(type);
if (reader != null) {
reader.read(buffer, particle);
}
return particle;
}
use of com.viaversion.viaversion.api.type.types.Particle in project ViaVersion by ViaVersion.
the class AbstractParticleType method read.
@Override
public Particle read(ByteBuf buffer) throws Exception {
int type = Type.VAR_INT.readPrimitive(buffer);
Particle particle = new Particle(type);
ParticleReader reader = readers.get(type);
if (reader != null) {
reader.read(buffer, particle);
}
return particle;
}
Aggregations