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

Properly handle leashes on hide

This commit is contained in:
LoJoSho
2023-01-03 16:38:11 -06:00
parent 2aa6b50938
commit 4680d5eec4
2 changed files with 5 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ public class CosmeticBalloonType extends Cosmetic {
balloonEntity.setVelocity(newLocation.clone().subtract(currentLocation.clone()).toVector());
PacketManager.sendTeleportPacket(balloonEntity.getPufferfishBalloonId(), newLocation, false, viewer);
PacketManager.sendLeashPacket(balloonEntity.getPufferfishBalloonId(), player.getEntityId(), viewer);
if (!user.getHidden()) PacketManager.sendLeashPacket(balloonEntity.getPufferfishBalloonId(), player.getEntityId(), viewer);
}
public String getModelName() {

View File

@@ -342,7 +342,6 @@ public class CosmeticUser {
}
if (hasCosmeticInSlot(CosmeticSlot.BACKPACK)) {
//CosmeticBackpackType cosmeticBackpackType = (CosmeticBackpackType) getCosmetic(CosmeticSlot.BACKPACK);
getPlayer().removePassenger(invisibleArmorstand);
invisibleArmorstand.getEquipment().clear();
}
updateCosmetic();
@@ -372,4 +371,8 @@ public class CosmeticUser {
updateCosmetic();
MessagesUtil.sendDebugMessages("ShowCosmetics");
}
public boolean getHidden() {
return this.hideCosmetics;
}
}