Example usage for io.netty.buffer ByteBuf writeInt

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

Introduction

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

Prototype

public abstract ByteBuf writeInt(int value);

Source Link

Document

Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer.

Usage

From source file:buildcraftAdditions.networking.MessageHeatedFurnaceProgress.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);
    buf.writeInt(z);
    buf.writeInt(progress);
}

From source file:buildcraftAdditions.networking.MessageKEBConfiguration.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);/*w  w  w.j  ava 2  s  .c  om*/
    buf.writeInt(z);
    for (int teller = 0; teller < 6; teller++)
        buf.writeInt(configuration[teller]);
}

From source file:buildcraftAdditions.networking.MessageKEBT1.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);//from   w  w w . j  a  v a2s.c  o  m
    buf.writeInt(z);
    buf.writeInt(energy);
    for (int teller = 0; teller < 6; teller++)
        buf.writeInt(configuration[teller]);
    buf.writeInt(length);
    char[] letters = owner.toCharArray();
    for (char letter : letters) {
        buf.writeChar(letter);
    }
}

From source file:buildcraftAdditions.networking.MessageKEBT2.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);/* w ww . j a v  a2 s. c  o m*/
    buf.writeInt(z);
    for (int teller = 0; teller < 6; teller++)
        buf.writeInt(configuration[teller]);
    buf.writeBoolean(partOfMultiBlock);
    buf.writeBoolean(isMaster);
    buf.writeInt(energy);
    buf.writeInt(masterX);
    buf.writeInt(masterY);
    buf.writeInt(masterZ);
    buf.writeInt(energyState);
    buf.writeInt(length);
    char[] letters = owner.toCharArray();
    for (char letter : letters) {
        buf.writeChar(letter);
    }

}

From source file:buildcraftAdditions.networking.MessageSelfDestruct.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);
    buf.writeInt(z);
}

From source file:buildcraftAdditions.networking.MessageSemiAutomaticDuster.java

License:GNU General Public License

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(this.x);
    buf.writeInt(this.y);
    buf.writeInt(this.z);
    buf.writeInt(this.id);
    buf.writeInt(this.meta);
}

From source file:buildcraftAdditions.networking.MessageWidgetUpdate.java

License:LGPL

@Override
public void toBytes(ByteBuf buf) {
    buf.writeInt(x);
    buf.writeInt(y);
    buf.writeInt(z);
    buf.writeInt(id);
    buf.writeInt(value);
}

From source file:buildcraftAdditions.tileEntities.Bases.TileBaseDuster.java

License:GNU General Public License

@Override
public void writeToByteBuff(ByteBuf buf) {
    buf.writeInt(progress);
    inventory.writeToByteBuff(buf);
}

From source file:buildcraftAdditions.tileEntities.Bases.TileKineticEnergyBufferBase.java

License:GNU General Public License

@Override
public void writeToByteBuff(ByteBuf buf) {
    buf.writeInt(energy);
    configuration.writeToByteBuff(buf);
    PlayerUtils.writeToByteBuff(buf, owner);
}

From source file:buildcraftAdditions.tileEntities.Bases.TileMachineBase.java

License:GNU General Public License

@Override
public void writeToByteBuff(ByteBuf buf) {
    buf.writeInt(energy);
}