Fixed dragon spawn location for text util.

This commit is contained in:
Jonathan Williams 2014-04-07 23:35:45 -04:00
parent 9b4e1aa9eb
commit e8260b20f7
1 changed files with 3 additions and 2 deletions

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