Example usage for io.netty.buffer ByteBuf readBoolean

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

Introduction

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

Prototype

public abstract boolean readBoolean();

Source Link

Document

Gets a boolean at the current readerIndex and increases the readerIndex by 1 in this buffer.

Usage

From source file:it.kytech.smartccraft.network.message.MessageTileEntitySCC.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    this.x = buf.readInt();
    this.y = buf.readInt();
    this.z = buf.readInt();
    this.orientation = buf.readByte();
    this.state = buf.readByte();
    int customNameLength = buf.readInt();
    this.customName = new String(buf.readBytes(customNameLength).array());
    if (buf.readBoolean()) {
        this.ownerUUID = new UUID(buf.readLong(), buf.readLong());
    } else {/*from  ww w  .  ja  v  a  2s.  c  o m*/
        this.ownerUUID = null;
    }
    fromBytesChild(buf);
}

From source file:ivorius.ivtoolkit.blocks.BlockCoord.java

License:Apache License

public static BlockCoord readCoordFromBuffer(ByteBuf buffer) {
    if (buffer.readBoolean()) {
        return new BlockCoord(buffer);
    }/*from  ww  w .ja  v a  2s . c  o m*/

    return null;
}

From source file:jayavery.geomastery.compat.jei.SGeoPacketSingle.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {

    this.space = buf.readInt();
    this.input = buf.readInt();
    this.max = buf.readBoolean();
}

From source file:jayavery.geomastery.packets.CPacketConfig.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {

    this.hideVanilla = buf.readBoolean();
    this.addCrafting = buf.readBoolean();
    this.temperature = buf.readBoolean();
    this.speed = buf.readBoolean();
    this.food = buf.readBoolean();
    this.inventory = buf.readBoolean();
}

From source file:jp.llv.locapi.PlayerLook.java

License:Open Source License

@Override
public void read(ByteBuf buf) {
    this.yaw = buf.readFloat();
    this.pitch = buf.readFloat();
    this.onGround = buf.readBoolean();
}

From source file:jp.llv.locapi.PlayerPosition.java

License:Open Source License

@Override
public void read(ByteBuf buf) {
    this.x = buf.readDouble();
    this.y = buf.readDouble();
    this.z = buf.readDouble();
    this.onGround = buf.readBoolean();
}

From source file:mal.carbonization.network.AutocraftingBenchMessageClient.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    xpos = buf.readInt();
    ypos = buf.readInt();
    zpos = buf.readInt();
    fuelUseChange = buf.readBoolean();
}

From source file:mal.carbonization.network.AutocraftingBenchMessageServer.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    xpos = buf.readInt();/*from w w  w  .jav  a  2  s. c  o  m*/
    ypos = buf.readInt();
    zpos = buf.readInt();

    int inputsize = buf.readInt();
    int iitemcount = buf.readInt();
    byte[] inputbyte = new byte[inputsize];
    buf.readBytes(inputbyte);
    inputStacks = ByteArraytoItemStack(inputbyte, iitemcount);

    int outputsize = buf.readInt();
    int oitemcount = buf.readInt();
    byte[] outputbyte = new byte[outputsize];
    buf.readBytes(outputbyte);
    outputStacks = ByteArraytoItemStack(outputbyte, oitemcount);

    int recipesize = buf.readInt();
    int ritemcount = buf.readInt();
    byte[] recipebyte = new byte[recipesize];
    buf.readBytes(recipebyte);
    recipeStacks = ByteArraytoItemStack(recipebyte, ritemcount);

    int upgradesize = buf.readInt();
    int uitemcount = buf.readInt();
    byte[] upgradebyte = new byte[upgradesize];
    buf.readBytes(upgradebyte);
    upgradeStacks = ByteArraytoItemStack(upgradebyte, uitemcount);

    fuelUsePercent = buf.readInt();
    processTime = buf.readInt();
    fuelUsage = buf.readInt();
    craftingCooldown = buf.readInt();
    disableButtons = buf.readBoolean();
    tankLevel = buf.readInt();
    tankCapacity = buf.readInt();
}

From source file:mal.carbonization.network.AutocraftingBenchMessageServerSync.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    xpos = buf.readInt();/* w ww .j  a va  2 s  . c o m*/
    ypos = buf.readInt();
    zpos = buf.readInt();
    fuelUsePercent = buf.readInt();
    processTime = buf.readInt();
    fuelUsage = buf.readInt();
    craftingCooldown = buf.readInt();
    disableButtons = buf.readBoolean();
    tankLevel = buf.readInt();
    tankCapacity = buf.readInt();

}

From source file:mal.carbonization.network.FuelConversionBenchMessageClient.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    xpos = buf.readInt();// w  w w .j a v a2 s. c  o m
    ypos = buf.readInt();
    zpos = buf.readInt();
    newState = buf.readBoolean();
    dindex = buf.readInt();
}