Example usage for io.netty.buffer ByteBuf writeByte

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

Introduction

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

Prototype

public abstract ByteBuf writeByte(int value);

Source Link

Document

Sets the specified byte at the current writerIndex and increases the writerIndex by 1 in this buffer.

Usage

From source file:buildcraft.silicon.TileAssemblyTable.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf stream) {
    super.writeData(stream);
    Utils.writeUTF(stream, currentRecipeId);
    stream.writeByte(plannedOutput.size());
    for (String s : plannedOutput) {
        Utils.writeUTF(stream, s);//ww w. ja v  a2 s  .co m
    }
}

From source file:buildcraft.silicon.TileIntegrationTable.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf buf) {
    buf.writeByte((byte) getMaxExpansionCount());
    NetworkUtils.writeStack(buf, clientOutputInv.getStackInSlot(0));
}

From source file:buildcraft.silicon.TileProgrammingTable.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf stream) {
    super.writeData(stream);
    Utils.writeUTF(stream, currentRecipeId);
    stream.writeByte(optionId);
}

From source file:buildcraft.silicon.TileProgrammingTable.java

License:Minecraft Mod Public

public void rpcSelectOption(final int pos) {
    BuildCraftCore.instance.sendToServer(new PacketCommand(this, "select", new CommandWriter() {
        public void write(ByteBuf data) {
            data.writeByte(pos);
        }/*from  w  w w  . j a v a2 s.  c o m*/
    }));
}

From source file:buildcraft.transport.network.PacketGateExpansionMap.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf data) {
    BiMap<Byte, String> map = GateExpansions.getServerMap();
    data.writeByte(map.size());
    for (Map.Entry<Byte, String> entry : map.entrySet()) {
        data.writeByte(entry.getKey());/*from w  w  w.  j av a2s  . c om*/
        Utils.writeUTF(data, entry.getValue());
    }
}

From source file:buildcraft.transport.network.PacketPipeTransportTraveler.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf data) {
    data.writeFloat((float) item.xCoord);
    data.writeFloat((float) item.yCoord);
    data.writeFloat((float) item.zCoord);

    data.writeShort(item.id);/*from  w ww .  ja v a  2 s.c  om*/

    data.writeByte((byte) item.input.ordinal());
    data.writeByte((byte) item.output.ordinal());

    data.writeByte(item.color != null ? item.color.ordinal() : -1);

    data.writeFloat(item.getSpeed());

    data.writeBoolean(forceStackRefresh);
}

From source file:buildcraft.transport.network.PacketPowerUpdate.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf data) {
    super.writeData(data);
    data.writeBoolean(overload);/*w  w w .j a va2  s  .  c  o m*/
    for (short element : displayPower) {
        data.writeByte(element);
    }
}

From source file:buildcraft.transport.pipes.PipeItemsDaizuli.java

License:Minecraft Mod Public

@Override
public void writeData(ByteBuf data) {
    data.writeByte(color);
}

From source file:buildcraft.transport.pipes.PipeItemsEmerald.java

License:Minecraft Mod Public

@Override
public void writeGuiData(ByteBuf data) {
    data.writeByte((byte) settings.getFilterMode().ordinal());
}

From source file:buildcraft.transport.utils.ConnectionMatrix.java

License:Minecraft Mod Public

public void writeData(ByteBuf data) {
    data.writeByte(mask);
}