mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2025-02-11 11:40:29 +00:00
Fixed exp orb packet no sent
This commit is contained in:
parent
0ca594e0b1
commit
bed69e85d3
1 changed files with 6 additions and 6 deletions
|
@ -30,7 +30,12 @@ public class Disguise {
|
|||
|
||||
public Packet constructPacket(Player p) {
|
||||
Packet spawnPacket = null;
|
||||
if (getType().isMob()) {
|
||||
if (getType() == DisguiseType.EXPERIENCE_ORB) {
|
||||
|
||||
Entity entity = getEntity(((CraftPlayer) p).getHandle().world, p.getLocation(), p.getEntityId());
|
||||
spawnPacket = new Packet26AddExpOrb((EntityExperienceOrb) entity);
|
||||
|
||||
} else if (getType().isMob()) {
|
||||
|
||||
EntityLiving entityLiving = ((MobDisguise) this).getEntityLiving(((CraftPlayer) p).getHandle().world,
|
||||
p.getLocation(), p.getEntityId());
|
||||
|
@ -53,11 +58,6 @@ public class Disguise {
|
|||
spawnPacket = new Packet20NamedEntitySpawn(entityHuman);
|
||||
((Packet20NamedEntitySpawn) spawnPacket).b = ((PlayerDisguise) this).getName();
|
||||
|
||||
} else if (getType() == DisguiseType.EXPERIENCE_ORB) {
|
||||
|
||||
Entity entity = getEntity(((CraftPlayer) p).getHandle().world, p.getLocation(), p.getEntityId());
|
||||
spawnPacket = new Packet26AddExpOrb((EntityExperienceOrb) entity);
|
||||
|
||||
}
|
||||
return spawnPacket;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue