Skip to content

Fix minecarts disappearing when derailing on sublevel#952

Open
JpegN wants to merge 3 commits into
ryanhcode:mainfrom
JpegN:main
Open

Fix minecarts disappearing when derailing on sublevel#952
JpegN wants to merge 3 commits into
ryanhcode:mainfrom
JpegN:main

Conversation

@JpegN
Copy link
Copy Markdown

@JpegN JpegN commented May 19, 2026

AbstractMinecartMixin: when a cart isn't on rails anymore (!isOnRails()), kick it back to world space right away instead of waiting for it to leave plot bounds and killing it. Server-only.

ClientPacketListenerMixin.sable$lerp: the sub-level to world branch was using setPos, which doesn't touch xo/yo/zo. That caused a one-frame flicker since rendering would interpolate between shipyard and world coords, drawing the entity at a ~15M block midpoint. Swapped it for moveTo. Fixes the flicker for any entity, not just minecarts.

Minecart entries in destroy_when_leaving_plot.json aren't used anymore.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 19, 2026

CLA assistant check
All committers have signed the CLA.

@ryanhcode ryanhcode self-assigned this May 20, 2026
@ryanhcode ryanhcode self-requested a review May 20, 2026 00:06
@Derpgamer22
Copy link
Copy Markdown

Derpgamer22 commented May 20, 2026

I was looking through here and I saw this and personally, I think this is amazing. Curious, do you think something like this is possible for armor stands as well? It'd be nice so if for whatever reason your armor stand falls off a ship, it doesn't just dematerialize with possible armor on it that would vanish with it :p

I do get that this is a weird spot to ask something like this... so sorry if me putting this comment here is something I shouldn't be doing.

@JpegN
Copy link
Copy Markdown
Author

JpegN commented May 20, 2026

I was looking through here and I saw this and personally, I think this is amazing. Curious, do you think something like this is possible for armor stands as well? It'd be nice so if for whatever reason your armor stand falls off a ship, it doesn't just dematerialize with possible armor on it that would vanish with it :p

I do get that this is a weird spot to ask something like this... so sorry if me putting this comment here is something I shouldn't be doing.

Possible, yes. But not by the same logic, the minecarts can simply go by isOnRails() or !isOnRails(). needless to say, armor stands don't use rails.
The obvious solution would be to check if the armor stand is grounded, then kicking it off the sublevel if not.

If you have any experience with java, or want to learn, give it a try! I'll make my own fix if needed when I'm next available (probably Sunday).

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.

4 participants