Search in sources :

Example 11 with Particle

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;
}
Also used : Particle(com.viaversion.viaversion.api.type.types.Particle)

Example 12 with 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;
}
Also used : Particle(com.viaversion.viaversion.api.type.types.Particle)

Aggregations

Particle (com.viaversion.viaversion.api.type.types.Particle)12 Item (com.viaversion.viaversion.api.minecraft.item.Item)4 MetaType (com.viaversion.viaversion.api.minecraft.metadata.MetaType)3 Metadata (com.viaversion.viaversion.api.minecraft.metadata.Metadata)3 Position (com.viaversion.viaversion.api.minecraft.Position)2 PacketWrapper (com.viaversion.viaversion.api.protocol.packet.PacketWrapper)2 PacketHandler (com.viaversion.viaversion.api.protocol.remapper.PacketHandler)2 PacketRemapper (com.viaversion.viaversion.api.protocol.remapper.PacketRemapper)2 ClientWorld (com.viaversion.viaversion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld)2 CompoundTag (com.github.steveice10.opennbt.tag.builtin.CompoundTag)1 NumberTag (com.github.steveice10.opennbt.tag.builtin.NumberTag)1 StringTag (com.github.steveice10.opennbt.tag.builtin.StringTag)1 Tag (com.github.steveice10.opennbt.tag.builtin.Tag)1 ViaBackwards (com.viaversion.viabackwards.ViaBackwards)1 EntityData (com.viaversion.viabackwards.api.entities.storage.EntityData)1 EntityPositionHandler (com.viaversion.viabackwards.api.entities.storage.EntityPositionHandler)1 LegacyEntityRewriter (com.viaversion.viabackwards.api.rewriters.LegacyEntityRewriter)1 ParticleMapping (com.viaversion.viabackwards.protocol.protocol1_12_2to1_13.data.ParticleMapping)1 Protocol1_13_2To1_14 (com.viaversion.viabackwards.protocol.protocol1_13_2to1_14.Protocol1_13_2To1_14)1 ChunkLightStorage (com.viaversion.viabackwards.protocol.protocol1_13_2to1_14.storage.ChunkLightStorage)1