001 package net.minecraft.src; 002 003 import cpw.mods.fml.common.Side; 004 import cpw.mods.fml.common.asm.SideOnly; 005 import java.io.DataInputStream; 006 import java.io.DataOutputStream; 007 import java.io.IOException; 008 009 public class Packet55BlockDestroy extends Packet 010 { 011 private int field_73329_a; 012 private int field_73327_b; 013 private int field_73328_c; 014 private int field_73325_d; 015 private int field_73326_e; 016 017 public Packet55BlockDestroy() {} 018 019 public Packet55BlockDestroy(int par1, int par2, int par3, int par4, int par5) 020 { 021 this.field_73329_a = par1; 022 this.field_73327_b = par2; 023 this.field_73328_c = par3; 024 this.field_73325_d = par4; 025 this.field_73326_e = par5; 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.field_73329_a = par1DataInputStream.readInt(); 034 this.field_73327_b = par1DataInputStream.readInt(); 035 this.field_73328_c = par1DataInputStream.readInt(); 036 this.field_73325_d = par1DataInputStream.readInt(); 037 this.field_73326_e = par1DataInputStream.read(); 038 } 039 040 /** 041 * Abstract. Writes the raw packet data to the data stream. 042 */ 043 public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException 044 { 045 par1DataOutputStream.writeInt(this.field_73329_a); 046 par1DataOutputStream.writeInt(this.field_73327_b); 047 par1DataOutputStream.writeInt(this.field_73328_c); 048 par1DataOutputStream.writeInt(this.field_73325_d); 049 par1DataOutputStream.write(this.field_73326_e); 050 } 051 052 /** 053 * Passes this Packet on to the NetHandler for processing. 054 */ 055 public void processPacket(NetHandler par1NetHandler) 056 { 057 par1NetHandler.handleBlockDestroy(this); 058 } 059 060 /** 061 * Abstract. Return the size of the packet (not counting the header). 062 */ 063 public int getPacketSize() 064 { 065 return 13; 066 } 067 068 @SideOnly(Side.CLIENT) 069 public int func_73322_d() 070 { 071 return this.field_73329_a; 072 } 073 074 @SideOnly(Side.CLIENT) 075 public int func_73321_f() 076 { 077 return this.field_73327_b; 078 } 079 080 @SideOnly(Side.CLIENT) 081 public int func_73324_g() 082 { 083 return this.field_73328_c; 084 } 085 086 @SideOnly(Side.CLIENT) 087 public int func_73320_h() 088 { 089 return this.field_73325_d; 090 } 091 092 @SideOnly(Side.CLIENT) 093 public int func_73323_i() 094 { 095 return this.field_73326_e; 096 } 097 098 /** 099 * only false for the abstract Packet class, all real packets return true 100 */ 101 public boolean isRealPacket() 102 { 103 return true; 104 } 105 106 /** 107 * eg return packet30entity.entityId == entityId; WARNING : will throw if you compare a packet to a different packet 108 * class 109 */ 110 public boolean containsSameEntityIDAs(Packet par1Packet) 111 { 112 Packet55BlockDestroy var2 = (Packet55BlockDestroy)par1Packet; 113 return var2.field_73329_a == this.field_73329_a; 114 } 115 }