List of usage examples for io.netty.buffer ByteBufOutputStream writeInt
@Override public void writeInt(int v) throws IOException
From source file:de.sanandrew.mods.enderstuffp.network.packet.PacketSetWeather.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple dataTuple) throws IOException { stream.writeInt((int) dataTuple.getValue(0)); stream.writeInt((int) dataTuple.getValue(1)); stream.writeInt((int) dataTuple.getValue(2)); stream.writeByte((byte) dataTuple.getValue(3)); stream.writeInt((int) dataTuple.getValue(4)); }
From source file:de.sanandrew.mods.enderstuffp.network.packet.PacketTileDataSync.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple dataTuple) throws IOException { TileEntity tile = (TileEntity) dataTuple.getValue(0); stream.writeInt(tile.xCoord); stream.writeInt(tile.yCoord);//from w ww . ja v a2 s .c o m stream.writeInt(tile.zCoord); if (tile instanceof ITileSync) { ((ITileSync) tile).writeToStream(stream); } }
From source file:de.sanandrew.mods.enderstuffp.tileentity.TileEntityBiomeDataCrystal.java
License:Creative Commons License
@Override public void writeToStream(ByteBufOutputStream stream) throws IOException { stream.writeInt(this.dataProgress); }
From source file:de.sanandrew.mods.enderstuffp.tileentity.TileEntityOreGenerator.java
License:Creative Commons License
@Override public void writeToStream(ByteBufOutputStream stream) throws IOException { stream.writeInt(this.fluxAmount); stream.writeInt(this.fluxGenerated); stream.writeInt(this.ticksGenRemain); }
From source file:de.sanandrew.mods.particledeco.network.packet.PacketParticleBoxSettings.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple dataTuple) throws IOException { @SuppressWarnings("unchecked") Pair<ChunkCoordinates, ParticleBoxData> data = (Pair) dataTuple; stream.writeInt(data.getValue0().posX); stream.writeInt(data.getValue0().posY); stream.writeInt(data.getValue0().posZ); data.getValue1().writeDataToByteBuf(stream); }
From source file:de.sanandrew.mods.particledeco.util.ParticleBoxData.java
License:Creative Commons License
public void writeDataToByteBuf(ByteBufOutputStream stream) throws IOException { stream.writeInt(this.particleColor); stream.writeFloat(this.particleHeight); stream.writeFloat(this.particleSpeed); stream.writeInt(this.particleType.ordinal()); stream.writeInt(this.particleSpread.ordinal()); }
From source file:de.sanandrew.mods.turretmod.network.packet.PacketDismantleTurret.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple data) throws IOException { stream.writeInt((Integer) data.getValue(0)); }
From source file:de.sanandrew.mods.turretmod.network.packet.PacketEjectUpgrade.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple data) throws IOException { stream.writeInt((Integer) data.getValue(0)); stream.writeUTF((String) data.getValue(1)); }
From source file:de.sanandrew.mods.turretmod.network.packet.PacketSendMultiTargetFlag.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple data) throws IOException { stream.writeInt((Integer) data.getValue(0)); try {//from w w w . j a v a2 s .co m @SuppressWarnings("unchecked") Map<Class<? extends EntityLiving>, Boolean> newTargetStg = (Map<Class<? extends EntityLiving>, Boolean>) data .getValue(1); stream.writeInt(newTargetStg.size()); for (Entry<Class<? extends EntityLiving>, Boolean> newTgts : newTargetStg.entrySet()) { stream.writeUTF((String) EntityList.classToStringMapping.get(newTgts.getKey())); stream.writeBoolean(newTgts.getValue()); } } catch (ClassCastException ex) { TurretMod.MOD_LOG.log(Level.WARN, "Cannot send multi-target list to server! An entry is invalid!"); throw new IOException(ex); } }
From source file:de.sanandrew.mods.turretmod.network.packet.PacketSendTargetFlag.java
License:Creative Commons License
@Override public void writeData(ByteBufOutputStream stream, Tuple data) throws IOException { stream.writeInt((Integer) data.getValue(0)); stream.writeUTF((String) data.getValue(1)); stream.writeBoolean((Boolean) data.getValue(2)); }