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 Packet33RelEntityMoveLook extends Packet30Entity 008 { 009 public Packet33RelEntityMoveLook() 010 { 011 this.rotating = true; 012 } 013 014 public Packet33RelEntityMoveLook(int par1, byte par2, byte par3, byte par4, byte par5, byte par6) 015 { 016 super(par1); 017 this.xPosition = par2; 018 this.yPosition = par3; 019 this.zPosition = par4; 020 this.yaw = par5; 021 this.pitch = par6; 022 this.rotating = true; 023 } 024 025 /** 026 * Abstract. Reads the raw packet data from the data stream. 027 */ 028 public void readPacketData(DataInputStream par1DataInputStream) throws IOException 029 { 030 super.readPacketData(par1DataInputStream); 031 this.xPosition = par1DataInputStream.readByte(); 032 this.yPosition = par1DataInputStream.readByte(); 033 this.zPosition = par1DataInputStream.readByte(); 034 this.yaw = par1DataInputStream.readByte(); 035 this.pitch = par1DataInputStream.readByte(); 036 } 037 038 /** 039 * Abstract. Writes the raw packet data to the data stream. 040 */ 041 public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException 042 { 043 super.writePacketData(par1DataOutputStream); 044 par1DataOutputStream.writeByte(this.xPosition); 045 par1DataOutputStream.writeByte(this.yPosition); 046 par1DataOutputStream.writeByte(this.zPosition); 047 par1DataOutputStream.writeByte(this.yaw); 048 par1DataOutputStream.writeByte(this.pitch); 049 } 050 051 /** 052 * Abstract. Return the size of the packet (not counting the header). 053 */ 054 public int getPacketSize() 055 { 056 return 9; 057 } 058 }