Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 41 lines 999 B view raw
1package net.minecraft.server; 2 3import java.io.DataInputStream; 4import java.io.DataOutputStream; 5import java.io.IOException; 6 7public class Packet17AddToInventory extends Packet { 8 9 public int a; 10 public int b; 11 public int c; 12 13 public Packet17AddToInventory() { 14 } 15 16 public Packet17AddToInventory(ItemStack itemstack) { 17 this.a = itemstack.id; 18 this.b = itemstack.count; 19 this.c = itemstack.damage; 20 } 21 22 public void a(DataInputStream datainputstream) throws IOException { 23 this.a = datainputstream.readShort(); 24 this.b = datainputstream.readByte(); 25 this.c = datainputstream.readShort(); 26 } 27 28 public void a(DataOutputStream dataoutputstream) throws IOException { 29 dataoutputstream.writeShort(this.a); 30 dataoutputstream.writeByte(this.b); 31 dataoutputstream.writeShort(this.c); 32 } 33 34 public void a(NetHandler nethandler) { 35 nethandler.a(this); 36 } 37 38 public int a() { 39 return 5; 40 } 41}