9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2026-01-06 15:51:50 +00:00

Removed velocity balloons (it did not work)

This commit is contained in:
LoJoSho
2022-11-21 21:05:39 -06:00
parent 93166cf3a7
commit f3ba2c4f5a

View File

@@ -8,6 +8,7 @@ import com.hibiscusmc.hmccosmetics.util.packets.PacketManager;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import org.spongepowered.configurate.ConfigurationNode;
public class CosmeticBalloonType extends Cosmetic {
@@ -26,12 +27,8 @@ public class CosmeticBalloonType extends Cosmetic {
Player player = Bukkit.getPlayer(user.getUniqueId());
final Location actual = player.getLocation().clone().add(Settings.getBalloonOffset());
//final Location previous = user.getBalloonEntity().getLocation();
//final Vector vector = user.getBalloonEntity().getLocation().toVector();
//if (vector != null) actual.add(user.getBalloonEntity().getLocation().toVector().multiply(-1));
user.getBalloonEntity().getModelEntity().moveTo(actual.getX(), actual.getY(), actual.getZ());
//user.getBalloonEntity().setVelocity(actual.clone().subtract(previous.clone()).toVector());
PacketManager.sendTeleportPacket(user.getBalloonEntity().getPufferfishBalloonId(), actual, false, PlayerUtils.getNearbyPlayers(player));
PacketManager.sendLeashPacket(user.getBalloonEntity().getPufferfishBalloonId(), player.getEntityId(), PlayerUtils.getNearbyPlayers(player));