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

fix: set velocity after setting the location

otherwise the velocity would be set to zero after teleporting the balloon
This commit is contained in:
yusshu
2025-03-10 19:24:12 -05:00
parent 4136d19396
commit 1118be1153

View File

@@ -79,8 +79,8 @@ public class CosmeticBalloonType extends Cosmetic {
} }
Vector velocity = newLocation.toVector().subtract(currentLocation.toVector()); Vector velocity = newLocation.toVector().subtract(currentLocation.toVector());
userBalloonManager.setVelocity(velocity.multiply(1.1));
userBalloonManager.setLocation(newLocation); userBalloonManager.setLocation(newLocation);
userBalloonManager.setVelocity(velocity.multiply(1.1));
HMCCPacketManager.sendTeleportPacket(userBalloonManager.getPufferfishBalloonId(), newLocation, false, viewer); HMCCPacketManager.sendTeleportPacket(userBalloonManager.getPufferfishBalloonId(), newLocation, false, viewer);
HMCCPacketManager.sendLeashPacket(userBalloonManager.getPufferfishBalloonId(), entity.getEntityId(), viewer); HMCCPacketManager.sendLeashPacket(userBalloonManager.getPufferfishBalloonId(), entity.getEntityId(), viewer);