Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/mineplex

This commit is contained in:
Chiss 2014-04-09 16:48:14 +10:00
commit 7d59f43ffa

View File

@ -5,6 +5,7 @@ import java.util.HashMap;
import net.minecraft.server.v1_7_R1.DataWatcher;
import net.minecraft.server.v1_7_R1.EntityPlayer;
import net.minecraft.server.v1_7_R1.MathHelper;
import net.minecraft.server.v1_7_R1.Packet;
import net.minecraft.server.v1_7_R1.PacketPlayInClientCommand;
import net.minecraft.server.v1_7_R1.PacketPlayOutEntityDestroy;
@ -38,7 +39,7 @@ public class UtilDisplay
mobPacket.a = (int) ENTITY_ID; //Entity ID
mobPacket.b = (byte) EntityType.ENDER_DRAGON.getTypeId(); //Mob type (ID: 64)
mobPacket.c = (int) Math.floor(loc.getBlockX() * 32.0D); //X position
mobPacket.d = (int) -200; //Y position
mobPacket.d = (int) MathHelper.floor(-200 * 32.0D); //Y position
mobPacket.e = (int) Math.floor(loc.getBlockZ() * 32.0D); //Z position
mobPacket.f = (byte) 0; //Pitch
mobPacket.g = (byte) 0; //Head Pitch
@ -80,7 +81,7 @@ public class UtilDisplay
public static DataWatcher getWatcher(String text, double health){
DataWatcher watcher = new DataWatcher(null);
watcher.a(0, (Byte) (byte) 0x20); //Flags, 0x20 = invisible
watcher.a(0, (Byte) (byte) 32); //Flags, 0x20 = invisible
watcher.a(6, (Float) (float) health);
watcher.a(10, (String) text); //Entity name
watcher.a(11, (Byte) (byte) 1); //Show name, 1 = show, 0 = don't show