List of usage examples for io.netty.buffer ByteBuf writeFloat
public abstract ByteBuf writeFloat(float value);
From source file:buildcraft.factory.TilePump.java
License:Minecraft Mod Public
@Override public PacketPayload getPacketPayload() { PacketPayload payload = new PacketPayload(new PacketPayload.StreamWriter() { @Override//from w ww . ja va 2 s . c om public void writeData(ByteBuf buf) { buf.writeInt(aimY); buf.writeFloat((float) tubeY); buf.writeBoolean(powered); } }); return payload; }
From source file:buildcraft.factory.TileQuarry.java
License:Minecraft Mod Public
@Override public void writeData(ByteBuf stream) { super.writeData(stream); box.writeData(stream);//from w ww .j a v a 2 s . c om stream.writeInt(targetX); stream.writeShort(targetY); stream.writeInt(targetZ); stream.writeDouble(headPosX); stream.writeDouble(headPosY); stream.writeDouble(headPosZ); stream.writeFloat((float) speed); stream.writeFloat((float) headTrajectory); int flags = stage.ordinal(); flags |= movingHorizontally ? 0x10 : 0; flags |= movingVertically ? 0x20 : 0; stream.writeByte(flags); }
From source file:buildcraft.factory.TileRefinery.java
License:Minecraft Mod Public
@Override public PacketPayload getPacketPayload() { PacketPayload payload = new PacketPayload(new PacketPayload.StreamWriter() { @Override/*from ww w .ja v a 2 s . co m*/ public void writeData(ByteBuf data) { data.writeFloat(animationSpeed); tankManager.writeData(data); } }); return payload; }
From source file:buildcraft.robotics.gui.GuiZonePlan.java
License:Minecraft Mod Public
private void uploadMap() { BuildCraftCore.instance.sendToServer(new PacketCommand(getContainer(), "computeMap", new CommandWriter() { public void write(ByteBuf data) { data.writeInt(cx);/*from w w w. j a va2s. c om*/ data.writeInt(cz); data.writeShort(getContainer().mapTexture.width); data.writeShort(getContainer().mapTexture.height); data.writeFloat(blocksPerPixel); } })); }
From source file:buildcraft.transport.network.PacketPipeTransportTraveler.java
License:Minecraft Mod Public
@Override public void writeData(ByteBuf data) { data.writeFloat((float) item.xCoord); data.writeFloat((float) item.yCoord); data.writeFloat((float) item.zCoord); data.writeShort(item.id);/*from w ww. j a va 2 s .c o m*/ data.writeByte((byte) item.input.ordinal()); data.writeByte((byte) item.output.ordinal()); data.writeByte(item.color != null ? item.color.ordinal() : -1); data.writeFloat(item.getSpeed()); data.writeBoolean(forceStackRefresh); }
From source file:buildcraftAdditions.entities.EntityLaserShot.java
License:GNU General Public License
@Override public void writeSpawnData(ByteBuf buffer) { buffer.writeFloat(strength); }
From source file:buildcraftAdditions.tileEntities.TileCoolingTower.java
License:GNU General Public License
@Override public void writeToByteBuff(ByteBuf buf) { buf.writeBoolean(valve);//from w w w.j ava 2 s.c o m buf.writeFloat(heat); input.writeToByteBuff(buf); output.writeToByteBuff(buf); coolant.writeToByteBuff(buf); data.writeToByteBuff(buf); upgrades.writeToByteBuff(buf); }
From source file:cn.academy.ability.teleport.msg.LocTeleMsg.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { super.toBytes(buf); buf.writeFloat(cp); }
From source file:cn.academy.api.data.MsgSimpleChange.java
License:Open Source License
@Override public void toBytes(ByteBuf buf) { buf.writeInt(entityID);/* w w w . ja va2s . com*/ buf.writeFloat(cp); buf.writeFloat(maxCP); buf.writeInt(skillCount); for (int i = 0; i < skillCount; ++i) { buf.writeFloat(skillExp[i]); } }
From source file:cn.liutils.api.player.state.StateLockRotation.java
License:Open Source License
@Override protected void writeBytes(ByteBuf buf) { buf.writeFloat(rotationPitch); buf.writeFloat(rotationYaw);// ww w . ja v a 2 s .co m buf.writeFloat(rotationYawHead); buf.writeFloat(cameraPitch); buf.writeFloat(cameraYaw); }