From 6d1e9a765573d21d7409f31451bc1823cb293746 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 25 Nov 2013 15:52:08 +1300 Subject: [PATCH] Change entity in disguise to getEntity() --- pom.xml | 2 +- .../disguise/disguisetypes/Disguise.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 70687c3a..563c0239 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ 2.7.0 - 7.7.3 + 7.7.3-SNAPSHOT diff --git a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java index 3e162f2b..7634f29c 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -196,9 +196,9 @@ public abstract class Disguise { // If the vectorY isn't 0. Cos if it is. Then it doesn't want to send any vectors. // If this disguise has velocity sending enabled and the entity is flying. if (vectorY != 0 && isVelocitySent() && (alwaysSendVelocity || !entity.isOnGround())) { - Vector vector = entity.getVelocity(); + Vector vector = getEntity().getVelocity(); // If the entity doesn't have velocity changes already - if (vector.getY() != 0 && !(vector.getY() < 0 && alwaysSendVelocity && entity.isOnGround())) { + if (vector.getY() != 0 && !(vector.getY() < 0 && alwaysSendVelocity && getEntity().isOnGround())) { return; } if (getType() != DisguiseType.EXPERIENCE_ORB || !entity.isOnGround()) { @@ -206,8 +206,8 @@ public abstract class Disguise { if (getType() == DisguiseType.WITHER_SKULL) { lookPacket = new PacketContainer(Packets.Server.ENTITY_LOOK); StructureModifier mods = lookPacket.getModifier(); - mods.write(0, entity.getEntityId()); - Location loc = entity.getLocation(); + mods.write(0, getEntity().getEntityId()); + Location loc = getEntity().getLocation(); mods.write( 4, PacketsManager.getYaw(getType(), DisguiseType.getType(entity.getType()), @@ -235,7 +235,7 @@ public abstract class Disguise { } mods.write(0, DisguiseAPI.getFakeDisguise(entity.getEntityId())); } else { - mods.write(0, entity.getEntityId()); + mods.write(0, getEntity().getEntityId()); } mods.write(1, (int) (vector.getX() * 8000)); mods.write( @@ -256,7 +256,7 @@ public abstract class Disguise { if (sendMovementPacket) { PacketContainer packet = new PacketContainer(Packets.Server.REL_ENTITY_MOVE); StructureModifier mods = packet.getModifier(); - mods.write(0, entity.getEntityId()); + mods.write(0, getEntity().getEntityId()); for (Player player : getPerverts()) { if (DisguiseAPI.isViewDisguises() || entity != player) { try {