9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 12:29:16 +00:00

fix: first-person backpacks in hidden areas

This commit is contained in:
LoJoSho
2023-07-25 19:20:20 -05:00
parent 11f26f8f0a
commit c7deb756db
2 changed files with 3 additions and 2 deletions

View File

@@ -69,7 +69,8 @@ public class CosmeticBackpackType extends Cosmetic {
}
}
PacketManager.sendRidingPacket(particleCloud.get(particleCloud.size() - 1), user.getUserBackpackManager().getFirstArmorStandId(), owner);
NMSHandlers.getHandler().equipmentSlotUpdate(user.getUserBackpackManager().getFirstArmorStandId(), EquipmentSlot.HEAD, firstPersonBackpack, owner);
if (!user.getHidden()) NMSHandlers.getHandler().equipmentSlotUpdate(user.getUserBackpackManager().getFirstArmorStandId(), EquipmentSlot.HEAD, firstPersonBackpack, owner);
MessagesUtil.sendDebugMessages("First Person Backpack Update[owner=" + user.getUniqueId() + ",player_location=" + loc + "]!", Level.INFO);
}
PacketManager.sendRidingPacket(entity.getEntityId(), user.getUserBackpackManager().getFirstArmorStandId(), outsideViewers);

View File

@@ -106,7 +106,7 @@ public class UserBackpackManager {
}
if (particleCloud != null) {
for (int i = 0; i < particleCloud.size(); i++) {
//particleCloud.get(i).remove();
PacketManager.sendEntityDestroyPacket(particleCloud.get(i), getCloudManager().getViewers());
}
this.particleCloud = null;
}