Skip to content

Fix landing balloons freezing mid-air when player exits before ground contact#125

Open
Eldrinn-Elantey wants to merge 2 commits intomasterfrom
fix/landing-balloons-stuck-on-mars
Open

Fix landing balloons freezing mid-air when player exits before ground contact#125
Eldrinn-Elantey wants to merge 2 commits intomasterfrom
fix/landing-balloons-stuck-on-mars

Conversation

@Eldrinn-Elantey
Copy link

Problem

When landing on Mars, the player is placed inside EntityLandingBalloons
which bounces to a stop on the surface. If the player exits the entity
before the first ground contact, the balloons freeze permanently near
the surface and cannot be destroyed by any means, leaving the rocket
inventory inside inaccessible.

Root cause

Two bugs in EntityLandingBalloons:

# Location Bug
1 tickInAir() Entire physics block was wrapped in if (worldObj.isRemote). Server never updated motionY, so the entity had no authoritative downward velocity once the rider left.
2 allowDamageSource() Returned false whenever groundHitCount == 0. Without a passenger this counter never increments, making the balloon permanently invulnerable.

Fix

  • tickInAir() — removed the isRemote guard. Gravity now runs on the
    server as well, so the balloon continues its descent regardless of whether
    a player is riding it.

  • allowDamageSource() — narrowed the invulnerability condition to
    groundHitCount == 0 && riddenByEntity != null (active ridden descent
    only). A balloon abandoned mid-air becomes damageable so the player can
    break it and recover the inventory at their own discretion.

What was intentionally NOT changed

The balloon is never destroyed automatically and its inventory is never
dropped without player interaction. The rocket stored inside is safe until
the player chooses to break the balloon.

…ts mid-air

Two related bugs caused landing balloons to freeze in place permanently
when the player exited the entity before its first ground contact on Mars.

1. tickInAir() was guarded by `if (this.worldObj.isRemote)`, meaning
   gravity and motion updates only ran on the client side. During a normal
   descent the riding client drives position packets and the server follows.
   Once the rider dismounts mid-air, no client sends position updates for
   the entity, so the server-side balloon freezes indefinitely.
   Fix: remove the isRemote guard so physics run on both sides.

2. allowDamageSource() blocked all damage while groundHitCount == 0.
   With no passenger, groundHitCount never increments, making the balloon
   permanently indestructible.
   Fix: restrict the invulnerability window to an active ridden descent only
   (groundHitCount == 0 && riddenByEntity != null). Once the passenger
   leaves before landing the balloon becomes damageable, letting the player
   retrieve their inventory manually.
@Eldrinn-Elantey Eldrinn-Elantey requested a review from a team March 10, 2026 13:15
@Nikolay-Sitnikov
Copy link

Is there an existing bug report for this issue? (It's fine if there isn't, but I want to make sure we don't leave orphaned issues behind.)

@Eldrinn-Elantey
Copy link
Author

I encountered this problem myself and heard about it from other players. When creating PR, I wanted to find an issue on this topic but couldn't find one. Perhaps people didn't consider it a serious problem and didn't create an issue. Even though the balls remain, this doesn't prevent you from taking the rocket from them.

@Nikolay-Sitnikov Nikolay-Sitnikov dismissed their stale review March 15, 2026 21:04

Forgot to check one thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants