001 package net.minecraft.network.packet; 002 003 import java.io.DataInputStream; 004 import java.io.DataOutputStream; 005 import java.io.IOException; 006 007 public class Packet13PlayerLookMove extends Packet10Flying 008 { 009 public Packet13PlayerLookMove() 010 { 011 this.rotating = true; 012 this.moving = true; 013 } 014 015 public Packet13PlayerLookMove(double par1, double par3, double par5, double par7, float par9, float par10, boolean par11) 016 { 017 this.xPosition = par1; 018 this.yPosition = par3; 019 this.stance = par5; 020 this.zPosition = par7; 021 this.yaw = par9; 022 this.pitch = par10; 023 this.onGround = par11; 024 this.rotating = true; 025 this.moving = true; 026 } 027 028 /** 029 * Abstract. Reads the raw packet data from the data stream. 030 */ 031 public void readPacketData(DataInputStream par1DataInputStream) throws IOException 032 { 033 this.xPosition = par1DataInputStream.readDouble(); 034 this.yPosition = par1DataInputStream.readDouble(); 035 this.stance = par1DataInputStream.readDouble(); 036 this.zPosition = par1DataInputStream.readDouble(); 037 this.yaw = par1DataInputStream.readFloat(); 038 this.pitch = par1DataInputStream.readFloat(); 039 super.readPacketData(par1DataInputStream); 040 } 041 042 /** 043 * Abstract. Writes the raw packet data to the data stream. 044 */ 045 public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException 046 { 047 par1DataOutputStream.writeDouble(this.xPosition); 048 par1DataOutputStream.writeDouble(this.yPosition); 049 par1DataOutputStream.writeDouble(this.stance); 050 par1DataOutputStream.writeDouble(this.zPosition); 051 par1DataOutputStream.writeFloat(this.yaw); 052 par1DataOutputStream.writeFloat(this.pitch); 053 super.writePacketData(par1DataOutputStream); 054 } 055 056 /** 057 * Abstract. Return the size of the packet (not counting the header). 058 */ 059 public int getPacketSize() 060 { 061 return 41; 062 } 063 }