Let exp orbs be a little bit nicer

This commit is contained in:
Andrew 2013-08-20 05:45:25 +12:00
parent 505f996b46
commit 9b4e9b4b62
2 changed files with 47 additions and 42 deletions

View File

@ -129,7 +129,6 @@ public class Disguise {
fallSpeed = 0;
break;
case DROPPED_ITEM:
case EXPERIENCE_ORB:
case MAGMA_CUBE:
case PRIMED_TNT:
fallSpeed = 0.2;
@ -139,6 +138,10 @@ public class Disguise {
case FALLING_BLOCK:
fallSpeed = 0.04;
break;
case EXPERIENCE_ORB:
fallSpeed = 0.0221;
movement = true;
break;
case SPIDER:
case CAVE_SPIDER:
fallSpeed = 0.0040;
@ -178,6 +181,7 @@ public class Disguise {
if (vector.getY() != 0 && !(vector.getY() < 0 && alwaysSendVelocity && entity.isOnGround())) {
return;
}
if (getType() != DisguiseType.EXPERIENCE_ORB || !entity.isOnGround()) {
PacketContainer lookPacket = null;
PacketContainer selfLookPacket = null;
if (getType() == DisguiseType.WITHER_SKULL) {
@ -214,13 +218,15 @@ public class Disguise {
mods.write(3, (int) (vector.getZ() * 8000));
try {
if (lookPacket != null)
ProtocolLibrary.getProtocolManager().sendServerPacket(player.getBukkitEntity(), lookPacket,
false);
ProtocolLibrary.getProtocolManager().sendServerPacket(player.getBukkitEntity(), packet, false);
ProtocolLibrary.getProtocolManager().sendServerPacket(player.getBukkitEntity(),
lookPacket, false);
ProtocolLibrary.getProtocolManager()
.sendServerPacket(player.getBukkitEntity(), packet, false);
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
// If we need to send more packets because else it still 'sinks'
if (sendMovementPacket) {
PacketContainer packet = new PacketContainer(Packets.Server.REL_ENTITY_MOVE);

View File

@ -380,7 +380,6 @@ public class PacketsManager {
case EGG:
case ENDER_PEARL:
case ENDER_SIGNAL:
case EXPERIENCE_ORB:
case FIREWORK:
case MINECART:
case MINECART_CHEST: