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:hellfirepvp.astralsorcery.common.integrations.mods.crafttweaker.network.InfusionRecipeAdd.java

License:Open Source License

@Override
public void read(ByteBuf buf) {
    this.in = ByteBufUtils.readItemStack(buf);
    this.out = ByteBufUtils.readItemStack(buf);
    this.consumeAll = buf.readBoolean();
    this.consumeChance = buf.readFloat();
    this.craftingTickTime = buf.readInt();
}

From source file:hellfirepvp.astralsorcery.common.integrations.mods.crafttweaker.network.LightTransmutationRemove.java

License:Open Source License

@Override
public void read(ByteBuf buf) {
    this.matchStack = ByteBufUtils.readItemStack(buf);
    this.matchMeta = buf.readBoolean();
}

From source file:hellfirepvp.astralsorcery.common.integrations.mods.crafttweaker.network.WellRecipeRemove.java

License:Open Source License

@Override
public void read(ByteBuf buf) {
    this.matchIn = ByteBufUtils.readItemStack(buf);
    if (buf.readBoolean()) {
        this.fluidOut = FluidRegistry.getFluid(ByteBufUtils.readString(buf));
    } else {//from  w w w  .j a  va 2 s .com
        this.fluidOut = null;
    }
}

From source file:hellfirepvp.astralsorcery.common.network.packet.client.PktRotateTelescope.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    this.isClockwise = buf.readBoolean();
    this.pos = ByteBufUtils.readPos(buf);
    this.dimId = buf.readInt();
}

From source file:hellfirepvp.astralsorcery.common.network.packet.client.PktUnlockPerk.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    this.serverAccept = buf.readBoolean();
    ConstellationPerks perk = ConstellationPerks.getById(buf.readInt());
    if (perk != null) {
        this.perk = perk;
    }/*  w  ww . j ava2s. c  o m*/
    if (!serverAccept) {
        IMajorConstellation cst = ConstellationRegistry
                .getMajorConstellationByName(ByteBufUtils.readString(buf));
        if (cst != null) {
            this.owningConstellation = cst;
        }
    }
}

From source file:hellfirepvp.astralsorcery.common.network.packet.server.PktAttunementAltarState.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    entityId = buf.readInt();//from w  w w  . ja  va  2  s  . c o m
    started = buf.readBoolean();
    worldId = buf.readInt();
    at = ByteBufUtils.readPos(buf);
}

From source file:hellfirepvp.astralsorcery.common.network.packet.server.PktLightningEffect.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    from = Vector3.fromBytes(buf);
    to = Vector3.fromBytes(buf);// w w w  .j a v a 2  s. c  o  m
    if (buf.readBoolean()) {
        float[] colorComponents = new float[4];
        for (int i = 0; i < colorComponents.length; i++) {
            colorComponents[i] = buf.readFloat();
        }
        colorOverlay = new Color(colorComponents[0], colorComponents[1], colorComponents[2],
                colorComponents[3]);
    }
}

From source file:hellfirepvp.astralsorcery.common.network.packet.server.PktOreScan.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    tumble = buf.readBoolean();
    int size = buf.readInt();
    positions = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        positions.add(ByteBufUtils.readPos(buf));
    }//w ww  .j a v  a2 s.c o m
}

From source file:hellfirepvp.astralsorcery.common.network.packet.server.PktProgressionUpdate.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    this.tier = buf.readInt();
    this.isProg = buf.readBoolean();
    this.isPresent = buf.readBoolean();
}

From source file:hellfirepvp.astralsorcery.common.network.packet.server.PktShootEntity.java

License:Open Source License

@Override
public void fromBytes(ByteBuf buf) {
    this.entityId = buf.readInt();
    this.motionVector = new Vector3(buf.readDouble(), buf.readDouble(), buf.readDouble());
    this.hasEffect = buf.readBoolean();
    if (this.hasEffect) {
        this.effectLength = buf.readDouble();
    }/*from   w  ww .ja  va2  s .c  o  m*/
}