Example usage for io.netty.buffer ByteBuf writeShort

List of usage examples for io.netty.buffer ByteBuf writeShort

Introduction

In this page you can find the example usage for io.netty.buffer ByteBuf writeShort.

Prototype

public abstract ByteBuf writeShort(int value);

Source Link

Document

Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer.

Usage

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.ItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeShort(getItemProcId());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.LightningItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeDouble(getX());/*w w  w.ja v  a2s .c o  m*/
    buf.writeDouble(getY());
    buf.writeShort(getDamage());
    for (byte b : getTeam().getBytes()) {
        buf.writeByte(b);
    }
    buf.writeByte(0);
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.MineItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeShort(getX());
    buf.writeShort(getY());//ww w .  j a va2s .com
    buf.writeShort(getObjectIndex());
    buf.writeShort(getDamage());
    buf.writeShort(getTertiary());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.MissileItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeInt(getLength());//from   ww  w . ja va 2s .c om
    buf.writeDouble(getX());
    buf.writeDouble(getY());
    buf.writeShort(getDamage());
    buf.writeShort(getDirection());
    buf.writeShort(getAlarm0());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.MortarItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeDouble(getX());/*from   ww w . j a  v a2  s  .c  om*/
    buf.writeDouble(getY());
    buf.writeDouble(getDamage());
    buf.writeShort(getDirection());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.PauldronItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeDouble(getX());/*from   ww w .j a va 2s  . co m*/
    buf.writeDouble(getY());
    buf.writeDouble(getDamage());
    buf.writeShort(getAlarm0());
    for (byte b : team.getBytes()) {
        buf.writeByte(b);
    }
    buf.writeByte(0);
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.PlasmaChainItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeShort(getMId());
    buf.writeDouble(getObjectIndex());/*from   ww w . ja v  a2s . c  om*/
    buf.writeShort(getTargetMId());
    buf.writeShort(getDamageCoefficient());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.ScopeItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeDouble(getX());/*from w  w  w  .jav  a2s. c o m*/
    buf.writeDouble(getY());
    buf.writeDouble(getObjectIndex());
    buf.writeShort(getMId());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.itemproc.StickyItemProcFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeShort(getParentObjectId());
    buf.writeShort(getParentMId());/*from w w w  .  j a  v a2 s  . c om*/
    buf.writeShort(getDamage());
}

From source file:io.github.stormcloud_dev.stormcloud.frame.serverbound.ActivateObjectServerBoundFrame.java

License:Apache License

@Override
public void writeData(ByteBuf buf) {
    super.writeData(buf);
    buf.writeDouble(getPlayerX());/*from  w  ww.  ja  v a2 s . c  om*/
    buf.writeDouble(getPlayerY());
    buf.writeShort(getObjectActivated());
    buf.writeShort(getObjectMId());
    buf.writeByte(getIntendedActiveState());
}