List of usage examples for io.netty.buffer ByteBuf writeBoolean
public abstract ByteBuf writeBoolean(boolean value);
From source file:ivorius.ivtoolkit.blocks.BlockCoord.java
License:Apache License
public static void writeCoordToBuffer(BlockCoord coord, ByteBuf buffer) { buffer.writeBoolean(coord != null); if (coord != null) { coord.writeToBuffer(buffer);/*from w ww . java 2s .co m*/ } }
From source file:jayavery.geomastery.compat.jei.SGeoPacketSingle.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(this.space); buf.writeInt(this.input); buf.writeBoolean(this.max); }
From source file:jayavery.geomastery.packets.CPacketConfig.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeBoolean(this.hideVanilla); buf.writeBoolean(this.addCrafting); buf.writeBoolean(this.temperature); buf.writeBoolean(this.speed); buf.writeBoolean(this.food); buf.writeBoolean(this.inventory); }
From source file:mal.carbonization.network.AutocraftingBenchMessageClient.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos); buf.writeInt(ypos); buf.writeInt(zpos); buf.writeBoolean(fuelUseChange); }
From source file:mal.carbonization.network.AutocraftingBenchMessageServer.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos);//w w w. j a va 2s . c om buf.writeInt(ypos); buf.writeInt(zpos); byte[] i = ItemStacktoByteArray(inputStacks); buf.writeInt(i.length); buf.writeInt(inputStacks.length); buf.writeBytes(i); byte[] o = ItemStacktoByteArray(outputStacks); buf.writeInt(o.length); buf.writeInt(outputStacks.length); buf.writeBytes(o); byte[] r = ItemStacktoByteArray(recipeStacks); buf.writeInt(r.length); buf.writeInt(recipeStacks.length); buf.writeBytes(r); byte[] u = ItemStacktoByteArray(upgradeStacks); buf.writeInt(u.length); buf.writeInt(upgradeStacks.length); buf.writeBytes(u); buf.writeInt(fuelUsePercent); buf.writeInt(processTime); buf.writeInt(fuelUsage); buf.writeInt(craftingCooldown); buf.writeBoolean(disableButtons); buf.writeInt(tankLevel); buf.writeInt(tankCapacity); }
From source file:mal.carbonization.network.AutocraftingBenchMessageServerSync.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos);/*from w w w.ja v a2 s .com*/ buf.writeInt(ypos); buf.writeInt(zpos); buf.writeInt(fuelUsePercent); buf.writeInt(processTime); buf.writeInt(fuelUsage); buf.writeInt(craftingCooldown); buf.writeBoolean(disableButtons); buf.writeInt(tankLevel); buf.writeInt(tankCapacity); }
From source file:mal.carbonization.network.FuelConversionBenchMessageClient.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos);// w w w . j a v a 2s .c o m buf.writeInt(ypos); buf.writeInt(zpos); buf.writeBoolean(newState); buf.writeInt(dindex); }
From source file:mal.carbonization.network.FuelConversionBenchMessageServer.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos);/*from w ww . j ava 2 s . c o m*/ buf.writeInt(ypos); buf.writeInt(zpos); buf.writeBoolean(fuelState); buf.writeInt(currentIndex); buf.writeInt(craftingCooldown); buf.writeInt(maxCooldown); buf.writeDouble(bonusYield); buf.writeBoolean(voidUpgrade); buf.writeInt(ejectSide); buf.writeInt(maxFuel); buf.writeInt(fuelStack); buf.writeBoolean(inventory); if (inventory) { byte[] i = ItemStacktoByteArray(inventoryStacks); buf.writeInt(i.length); buf.writeInt(inventoryStacks.length); buf.writeBytes(i); byte[] o = ItemStacktoByteArray(upgradeStacks); buf.writeInt(o.length); buf.writeInt(upgradeStacks.length); buf.writeBytes(o); } }
From source file:mal.carbonization.network.FurnacesMessage.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(xpos);// w w w .ja va2 s .co m buf.writeInt(ypos); buf.writeInt(zpos); buf.writeByte(facing); buf.writeInt(metadata); buf.writeBoolean(usesExtraTime); buf.writeBoolean(isActive); buf.writeDouble(furnaceCookTimeMultiplyer); buf.writeInt(furnaceMaxCookTime); buf.writeInt(tier); buf.writeInt(furnaceBurnTime); buf.writeInt(currentItemBurnTime); buf.writeInt(furnaceCookTime); byte[] b = ItemStacktoByteArray(inventory); buf.writeInt(b.length); buf.writeInt(inventory.length); buf.writeBytes(b); }
From source file:mal.carbonization.network.MultiblockFurnaceMessageClient.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeBoolean(passFuel); buf.writeInt(xpos); buf.writeInt(ypos); buf.writeInt(zpos); }