diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/HolographicDisplays.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/HolographicDisplays.java index a9613301..09718242 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/HolographicDisplays.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/HolographicDisplays.java @@ -133,7 +133,7 @@ public class HolographicDisplays extends JavaPlugin { "******************************************************", " This version of HolographicDisplays can", " only work on these server versions:", - " from 1.6.4 to 1.8.4.", + " from 1.6.4 to 1.8.7.", " The plugin will be disabled.", "******************************************************" ); diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R1/EntityNMSWitherSkull.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R1/EntityNMSWitherSkull.java index e4e1c6a0..62ac7549 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R1/EntityNMSWitherSkull.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R1/EntityNMSWitherSkull.java @@ -11,6 +11,7 @@ import net.minecraft.server.v1_7_R1.NBTTagCompound; import net.minecraft.server.v1_7_R1.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_7_R1.World; import net.minecraft.server.v1_7_R1.EntityPlayer; +import net.minecraft.server.v1_7_R1.MathHelper; public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWitherSkull { @@ -120,7 +121,14 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither super.setPosition(x, y, z); // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F) + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -141,7 +149,7 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R2/EntityNMSWitherSkull.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R2/EntityNMSWitherSkull.java index fb656654..9456dfa4 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R2/EntityNMSWitherSkull.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R2/EntityNMSWitherSkull.java @@ -5,6 +5,7 @@ import net.minecraft.server.v1_7_R2.EntityWitherSkull; import net.minecraft.server.v1_7_R2.NBTTagCompound; import net.minecraft.server.v1_7_R2.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_7_R2.World; +import net.minecraft.server.v1_7_R2.MathHelper; import org.bukkit.craftbukkit.v1_7_R2.entity.CraftEntity; @@ -122,7 +123,14 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither super.setPosition(x, y, z); // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F) + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -143,7 +151,7 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R3/EntityNMSWitherSkull.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R3/EntityNMSWitherSkull.java index 50e03cbf..6f9fea2b 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R3/EntityNMSWitherSkull.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R3/EntityNMSWitherSkull.java @@ -11,6 +11,7 @@ import net.minecraft.server.v1_7_R3.NBTTagCompound; import net.minecraft.server.v1_7_R3.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_7_R3.World; import net.minecraft.server.v1_7_R3.EntityPlayer; +import net.minecraft.server.v1_7_R3.MathHelper; public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWitherSkull { @@ -120,7 +121,14 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither super.setPosition(x, y, z); // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F) + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -141,7 +149,7 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R4/EntityNMSWitherSkull.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R4/EntityNMSWitherSkull.java index 68e0a5dd..b7155cdf 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R4/EntityNMSWitherSkull.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_7_R4/EntityNMSWitherSkull.java @@ -11,6 +11,7 @@ import net.minecraft.server.v1_7_R4.NBTTagCompound; import net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_7_R4.World; import net.minecraft.server.v1_7_R4.EntityPlayer; +import net.minecraft.server.v1_7_R4.MathHelper; public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWitherSkull { @@ -121,7 +122,14 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither super.setPosition(x, y, z); // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F) + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -142,7 +150,7 @@ public class EntityNMSWitherSkull extends EntityWitherSkull implements NMSWither @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R1/EntityNMSArmorStand.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R1/EntityNMSArmorStand.java index aee0662a..c2267990 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R1/EntityNMSArmorStand.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R1/EntityNMSArmorStand.java @@ -10,6 +10,7 @@ import net.minecraft.server.v1_8_R1.NBTTagCompound; import net.minecraft.server.v1_8_R1.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_8_R1.Vec3D; import net.minecraft.server.v1_8_R1.World; +import net.minecraft.server.v1_8_R1.MathHelper; import org.bukkit.craftbukkit.v1_8_R1.entity.CraftEntity; @@ -180,9 +181,16 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta public void setLocationNMS(double x, double y, double z) { super.setPosition(x, y, z); - // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F), + this.onGround + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -203,7 +211,7 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R2/EntityNMSArmorStand.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R2/EntityNMSArmorStand.java index a96eccdd..1aebf8c0 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R2/EntityNMSArmorStand.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R2/EntityNMSArmorStand.java @@ -10,6 +10,7 @@ import net.minecraft.server.v1_8_R2.NBTTagCompound; import net.minecraft.server.v1_8_R2.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_8_R2.Vec3D; import net.minecraft.server.v1_8_R2.World; +import net.minecraft.server.v1_8_R2.MathHelper; import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity; @@ -180,9 +181,16 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta public void setLocationNMS(double x, double y, double z) { super.setPosition(x, y, z); - // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F), + this.onGround + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -203,7 +211,7 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R3/EntityNMSArmorStand.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R3/EntityNMSArmorStand.java index 22f8fc4a..f6db5e40 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R3/EntityNMSArmorStand.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/nms/v1_8_R3/EntityNMSArmorStand.java @@ -6,6 +6,7 @@ import net.minecraft.server.v1_8_R3.EntityArmorStand; import net.minecraft.server.v1_8_R3.EntityHuman; import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.ItemStack; +import net.minecraft.server.v1_8_R3.MathHelper; import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport; import net.minecraft.server.v1_8_R3.Vec3D; @@ -180,9 +181,16 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta public void setLocationNMS(double x, double y, double z) { super.setPosition(x, y, z); - // Send a packet near to update the position. - PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport(this); + PacketPlayOutEntityTeleport teleportPacket = new PacketPlayOutEntityTeleport( + getIdNMS(), + MathHelper.floor(this.locX * 32.0D), + MathHelper.floor(this.locY * 32.0D), + MathHelper.floor(this.locZ * 32.0D), + (byte) (int) (this.yaw * 256.0F / 360.0F), + (byte) (int) (this.pitch * 256.0F / 360.0F), + this.onGround + ); for (Object obj : this.world.players) { if (obj instanceof EntityPlayer) { @@ -203,7 +211,7 @@ public class EntityNMSArmorStand extends EntityArmorStand implements NMSArmorSta @Override public int getIdNMS() { - return this.getId(); + return super.getId(); // Return the real ID without checking the stack trace. } @Override