From 46281dfcc14f78dd44f2a218ac413720754728e1 Mon Sep 17 00:00:00 2001 From: IanTapply22 Date: Fri, 21 Jun 2024 11:46:45 -0400 Subject: [PATCH] Stop leash from breaking when falling --- .../java/net/jeqo/bloons/balloon/single/SingleBalloon.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/jeqo/bloons/balloon/single/SingleBalloon.java b/src/main/java/net/jeqo/bloons/balloon/single/SingleBalloon.java index bbb0f728..f5b2a943 100644 --- a/src/main/java/net/jeqo/bloons/balloon/single/SingleBalloon.java +++ b/src/main/java/net/jeqo/bloons/balloon/single/SingleBalloon.java @@ -92,6 +92,12 @@ public void run() { // Teleport the balloon to the move location and set the player location yaw this.teleport(this.getMoveLocation()); + + // If the balloon armor stand is more than 5 blocks away, teleport to player location + if (this.getBalloonArmorStand().getLocation().distance(playerLocation) > 5.0D) { + this.teleport(playerLocation); + } + this.setPlayerLocation(this.getPlayer().getLocation()); this.getPlayerLocation().setYaw(playerLocation.getYaw()); this.setTicks(this.getTicks() + 1);