Example usage for io.netty.buffer ByteBufInputStream readDouble

List of usage examples for io.netty.buffer ByteBufInputStream readDouble

Introduction

In this page you can find the example usage for io.netty.buffer ByteBufInputStream readDouble.

Prototype

@Override
    public double readDouble() throws IOException 

Source Link

Usage

From source file:de.sanandrew.mods.claysoldiers.network.packet.PacketParticleFX.java

License:Creative Commons License

@Override
public void process(ByteBufInputStream stream, ByteBuf rawData, INetHandler handler) throws IOException {
    EnumParticleFx fxType = EnumParticleFx.VALUES[stream.readByte()];
    switch (fxType) {
    case FX_DIGGING: // FALL_THROUGH
    case FX_BREAK: // FALL_THROUGH
    case FX_SOLDIER_DEATH:
        ClaySoldiersMod.proxy.spawnParticles(fxType, Quartet.with(stream.readDouble(),
                stream.readDouble() + 0.5D, stream.readDouble(), stream.readUTF()));
        break;//from   ww w . j a  va 2s. com
    case FX_CRIT:
        ClaySoldiersMod.proxy.spawnParticles(fxType,
                Triplet.with(stream.readDouble(), stream.readDouble() + 0.1D, stream.readDouble()));
        break;
    case FX_HORSE_DEATH: // FALL_THROUGH
    case FX_BUNNY_DEATH: // FALL_THROUGH
    case FX_TURTLE_DEATH:
        ClaySoldiersMod.proxy.spawnParticles(fxType, Quartet.with(stream.readDouble(),
                stream.readDouble() + 0.5D, stream.readDouble(), stream.readByte()));
        break;
    case FX_SPELL:
        ClaySoldiersMod.proxy.spawnParticles(fxType,
                Sextet.with(stream.readDouble(), stream.readDouble() + 0.5D, stream.readDouble(),
                        stream.readDouble(), stream.readDouble(), stream.readDouble()));
        break;
    case FX_SHOCKWAVE: // FALL_THROUGH
    case FX_MAGMAFUSE:
        ClaySoldiersMod.proxy.spawnParticles(fxType,
                Triplet.with(stream.readDouble(), stream.readDouble(), stream.readDouble()));
        break;
    }
}

From source file:de.sanandrew.mods.enderstuffp.network.packet.PacketParticleFX.java

License:Creative Commons License

@Override
public void process(ByteBufInputStream stream, ByteBuf rawData, INetHandler handler) throws IOException {
    EnderStuffPlus.proxy.handleParticle(EnumParticleFx.VALUES[stream.readByte()], stream.readDouble(),
            stream.readDouble(), stream.readDouble(), Tuple.readFromByteBufStream(stream));
}