List of usage examples for io.netty.buffer ByteBuf writeInt
public abstract ByteBuf writeInt(int value);
From source file:blusunrize.immersiveengineering.common.util.network.MessageMagnetEquip.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(this.fetchSlot); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageMinecartShaderSync.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(this.entityID); buf.writeBoolean(this.request); if (!request) ByteBufUtils.writeItemStack(buf, this.shader); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageMineralListSync.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(map.size()); for (Map.Entry<MineralMix, Integer> e : map.entrySet()) { NBTTagCompound tag = e.getKey().writeToNBT(); tag.setInteger("weight", e.getValue()); ByteBufUtils.writeTag(buf, tag); }/*from w w w. jav a2 s .c o m*/ }
From source file:blusunrize.immersiveengineering.common.util.network.MessageNoSpamChatComponents.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(chatMessages.length); for (ITextComponent component : chatMessages) ByteBufUtils.writeUTF8String(buf, ITextComponent.Serializer.componentToJson(component)); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageObstructedConnection.java
@Override public void toBytes(ByteBuf buf) { buf.writeDouble(start.x).writeDouble(start.y).writeDouble(start.z); buf.writeDouble(end.x).writeDouble(end.y).writeDouble(end.z); buf.writeInt(startB.getX()).writeInt(startB.getY()).writeInt(startB.getZ()); buf.writeInt(endB.getX()).writeInt(endB.getY()).writeInt(endB.getZ()); buf.writeInt(blocking.getX()).writeInt(blocking.getY()).writeInt(blocking.getZ()); ByteBufUtils.writeUTF8String(buf, wireType.getUniqueName()); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageRequestBlockUpdate.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(pos.getX()).writeInt(pos.getY()).writeInt(pos.getZ()); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageSetGhostSlots.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(stacksToSet.size()); for (Entry<ItemStack> e : stacksToSet.int2ObjectEntrySet()) { buf.writeInt(e.getIntKey());//from w w w . java 2 s . com NBTTagCompound nbt = new NBTTagCompound(); e.getValue().writeToNBT(nbt); ByteBufUtils.writeTag(buf, nbt); } }
From source file:blusunrize.immersiveengineering.common.util.network.MessageShaderManual.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(this.key.ordinal()); if (args != null) { buf.writeInt(this.args.length); for (String s : args) ByteBufUtils.writeUTF8String(buf, s); } else//from ww w .j av a 2s .co m buf.writeInt(0); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageSkyhookSync.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(entityID); ByteBufUtils.writeTag(buf, connection.writeToNBT()); buf.writeDouble(linePos);// w w w . j av a2 s . co m buf.writeDouble(speed); }
From source file:blusunrize.immersiveengineering.common.util.network.MessageTileSync.java
@Override public void toBytes(ByteBuf buf) { buf.writeInt(pos.getX()).writeInt(pos.getY()).writeInt(pos.getZ()); ByteBufUtils.writeTag(buf, this.nbt); }