List of usage examples for io.netty.buffer ByteBuf readByte
public abstract byte readByte();
From source file:buildcraft.transport.pipes.PipeItemsEmzuli.java
License:Minecraft Mod Public
@Override public void readGuiData(ByteBuf data, EntityPlayer paramEntityPlayer) { byte slot = data.readByte(); slotColors[slot] = data.readByte();//from ww w .j a v a 2 s. c o m }
From source file:buildcraft.transport.utils.ConnectionMatrix.java
License:Minecraft Mod Public
public void readData(ByteBuf data) { byte newMask = data.readByte(); if (newMask != mask) { mask = newMask;/*from w w w .java 2s .c o m*/ dirty = true; } }
From source file:buildcraft.transport.utils.FacadeMatrix.java
License:Minecraft Mod Public
public void readData(ByteBuf data) { for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { short id = data.readShort(); Block block;/* w w w.j av a 2 s .c o m*/ if (id == 0) { block = null; } else { block = (Block) Block.blockRegistry.getObjectById(id); } if (blocks[i] != block) { blocks[i] = block; dirty = true; } byte meta = data.readByte(); if (blockMetas[i] != meta) { blockMetas[i] = meta; dirty = true; } } }
From source file:buildcraft.transport.utils.TextureMatrix.java
License:Minecraft Mod Public
public void readData(ByteBuf data) { for (int i = 0; i < iconIndexes.length; i++) { int icon = data.readByte(); if (iconIndexes[i] != icon) { iconIndexes[i] = icon;/*from w w w . ja v a 2 s .c o m*/ dirty = true; } } }
From source file:buildcraft.transport.utils.WireMatrix.java
License:Minecraft Mod Public
public void readData(ByteBuf data) { bitSetCodec.decode(data.readByte(), hasWire); for (int i = 0; i < PipeWire.values().length; i++) { wires[i].readData(data);/*from ww w .j av a 2 s . c o m*/ wireIconIndex[i] = data.readByte(); } }
From source file:buildcraftAdditions.api.configurableOutput.SideConfiguration.java
License:GNU General Public License
@Override public void readFromByteBuff(ByteBuf buf) { for (ForgeDirection direction : VALID_DIRECTIONS) { setStatus(EnumSideStatus.values()[buf.readByte()], direction); setPriority(EnumPriority.values()[buf.readByte()], direction); }/* www . jav a2 s .c o m*/ }
From source file:buildcraftAdditions.networking.MessagePipeColoringTool.java
License:GNU General Public License
@Override public void fromBytes(ByteBuf buf) { color = buf.readByte(); sortMode = buf.readBoolean(); }
From source file:buildcraftAdditions.tileEntities.TileItemSorter.java
License:GNU General Public License
@Override public void readFromByteBuff(ByteBuf buf) { rotation = ForgeDirection.getOrientation(buf.readByte()); buf.readBytes(colors); updateRender(); }
From source file:buildcraftAdditions.tileEntities.varHelpers.Upgrades.java
License:GNU General Public License
@Override public void readFromByteBuff(ByteBuf buf) { maxUpgrades = buf.readByte(); upgrades.clear();/*from ww w. j a va 2 s .c o m*/ byte installedUpgrades = buf.readByte(); for (byte b = 0; b < installedUpgrades; b++) upgrades.add(EnumMachineUpgrades.values()[buf.readByte()]); }
From source file:cloudfoundry.norouter.f5.dropsonde.LineEventDecoder.java
License:Open Source License
private String nextString(ByteBuf buffer) { // Read space terminated string final int start = buffer.readerIndex(); int length = 0; while (buffer.readByte() != ' ') { length++;//ww w. j a va 2 s . c om } return buffer.toString(start, length, StandardCharsets.UTF_8); }