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:com.builtbroken.assemblyline.content.belt.TilePipeBelt.java

@Override
public void readDescPacket(ByteBuf buf) {
    super.readDescPacket(buf);
    type = BeltType.values()[buf.readInt()];
    shouldUpdateRender = buf.readBoolean();
    shouldEjectItems = buf.readBoolean();
    pullItems = buf.readBoolean();/*from ww  w. j  a v  a2 s. c  o m*/
    renderTop = buf.readBoolean();
    readInvPacket(buf);
    if (buf.readBoolean()) {
        loadBeltStates(ByteBufUtils.readTag(buf).getTagList("beltStates", 10));
    }
}

From source file:com.builtbroken.assemblyline.content.belt.TilePipeBelt.java

@Override
protected void readGuiPacket(EntityPlayer player, ByteBuf buf) {
    shouldEjectItems = buf.readBoolean();
    pullItems = buf.readBoolean();//from w w  w.j a  v a 2  s.c  o m
    renderTop = buf.readBoolean();
}

From source file:com.builtbroken.assemblyline.content.inserter.TileInsertArmClient.java

@Override
public void readDescPacket(ByteBuf buf) {
    super.readDescPacket(buf);
    rotation.readByteBuf(buf);// w w  w  . jav  a 2s  .  com
    if (buf.readBoolean()) {
        renderStack = ByteBufUtils.readItemStack(buf);
    } else {
        renderStack = null;
    }
    worldObj.markBlockRangeForRenderUpdate(xi(), yi(), zi(), xi(), yi(), zi());
}

From source file:com.builtbroken.assemblyline.content.rail.powered.TilePowerRailClient.java

@Override
public void readDescPacket(ByteBuf buf) {
    railType = PoweredRails.get(buf.readInt());
    setFacingDirection(ForgeDirection.getOrientation(buf.readInt()));
    if (isRotationRail()) {
        rotateToAngle = buf.readBoolean();
        rotateClockwise = buf.readBoolean();
        rotateYaw = buf.readInt();//w  w w .  j av a 2 s  .  c  o m
    } else if (isStopRail()) {
        stopCarts = buf.readBoolean();
    } else if (isLoaderRail() || isLoaderRail()) {
        rotateClockwise = buf.readBoolean();
    }
    oldWorld().markBlockRangeForRenderUpdate(xi(), yi(), zi(), xi(), yi(), zi());
}

From source file:com.builtbroken.atomic.content.machines.reactor.fission.core.TileEntityReactorCell.java

@Override
protected void readDescPacket(ByteBuf buf, EntityPlayer player) {
    super.readDescPacket(buf, player);
    _running = buf.readBoolean();
    _renderFuel = buf.readBoolean();//  w w  w .j  a  v a  2 s .co m
    _renderFuelLevel = buf.readFloat();
}

From source file:com.builtbroken.atomic.network.packet.trigger.PacketMouse.java

@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
    slot = buffer.readInt();// w  w w  .j  a va  2 s .c  om
    forward = buffer.readBoolean();
    ctrl = buffer.readBoolean();
}

From source file:com.builtbroken.comecloser.network.SyncSettings.java

@Override
public void fromBytes(ByteBuf buf) {
    min = buf.readFloat();
    max = buf.readFloat();
    doRay = buf.readBoolean();
}

From source file:com.builtbroken.grappling.content.entity.EntityHook.java

@Override
public void readSpawnData(ByteBuf additionalData) {
    if (additionalData.readBoolean()) {
        hook = Hook.read(additionalData);
    } else {//  ww  w .  j a  va  2s.c om
        hook = null;
    }
}

From source file:com.builtbroken.grappling.network.packets.PacketHookSync.java

@Override
public void read(ByteBuf buffer) {
    if (buffer.readBoolean()) {
        playerHook = Hook.read(buffer);/*www.j  a  v a 2 s.c o  m*/
    } else {
        playerHook = null;
    }
}

From source file:com.builtbroken.grappling.network.packets.PacketMouseClick.java

@Override
public void read(ByteBuf buffer) {
    slot = buffer.readInt();/*  ww  w .j  a  v a  2  s .  com*/
    button = buffer.readInt();
    dwheel = buffer.readInt();
    state = buffer.readBoolean();
}