Exp packets shouldn't be in the velocity group
This commit is contained in:
parent
999c80076d
commit
81854db3d0
@ -217,7 +217,7 @@ public abstract class Disguise {
|
|||||||
}
|
}
|
||||||
// If the vectorY isn't 0. Cos if it is. Then it doesn't want to send any vectors.
|
// 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 this disguise has velocity sending enabled and the entity is flying.
|
||||||
if (vectorY != 0 && isVelocitySent() && (alwaysSendVelocity || !getEntity().isOnGround())) {
|
if (isVelocitySent() && vectorY != 0 && (alwaysSendVelocity || !getEntity().isOnGround())) {
|
||||||
Vector vector = getEntity().getVelocity();
|
Vector vector = getEntity().getVelocity();
|
||||||
// If the entity doesn't have velocity changes already - You know. I really can't wrap my head about the
|
// If the entity doesn't have velocity changes already - You know. I really can't wrap my head about the
|
||||||
// if statement.
|
// if statement.
|
||||||
@ -277,27 +277,27 @@ public abstract class Disguise {
|
|||||||
}
|
}
|
||||||
// If we need to send a packet to update the exp position as it likes to gravitate client sided to
|
// If we need to send a packet to update the exp position as it likes to gravitate client sided to
|
||||||
// players.
|
// players.
|
||||||
if (getType() == DisguiseType.EXPERIENCE_ORB) {
|
}
|
||||||
PacketContainer packet = new PacketContainer(PacketType.Play.Server.REL_ENTITY_MOVE);
|
if (getType() == DisguiseType.EXPERIENCE_ORB) {
|
||||||
packet.getIntegers().write(0, getEntity().getEntityId());
|
PacketContainer packet = new PacketContainer(PacketType.Play.Server.REL_ENTITY_MOVE);
|
||||||
try {
|
packet.getIntegers().write(0, getEntity().getEntityId());
|
||||||
for (Player player : DisguiseUtilities.getPerverts(disguise)) {
|
try {
|
||||||
if (getEntity() != player) {
|
for (Player player : DisguiseUtilities.getPerverts(disguise)) {
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet, false);
|
if (getEntity() != player) {
|
||||||
} else if (isSelfDisguiseVisible()) {
|
ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet, false);
|
||||||
PacketContainer selfPacket = packet.shallowClone();
|
} else if (isSelfDisguiseVisible()) {
|
||||||
selfPacket.getModifier().write(0, DisguiseAPI.getFakeDisguise(getEntity().getUniqueId()));
|
PacketContainer selfPacket = packet.shallowClone();
|
||||||
try {
|
selfPacket.getModifier().write(0, DisguiseAPI.getFakeDisguise(getEntity().getUniqueId()));
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket((Player) getEntity(),
|
try {
|
||||||
selfPacket, false);
|
ProtocolLibrary.getProtocolManager().sendServerPacket((Player) getEntity(), selfPacket,
|
||||||
} catch (InvocationTargetException e) {
|
false);
|
||||||
e.printStackTrace();
|
} catch (InvocationTargetException e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user