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