Hello! Recently I have been having an issue where whenever I stand up from my airship, I teleport to the last known location of the helm. Every time I move further than around 60 blocks I am teleported away from my airship. Is there a way I can fix this?
Reply chain from #48
yeah, this one:
https://github.com/Eminai-LeoVinci/Eureka/commit/5c74944f2c94926a23a93d3a0a7970f6ef9b5e82
its 24 lines in ShipHelmBlockEntity, a syncSeatedRiders helper plus one call at
the end of the tick that already runs. all it does is take each seat, transforms
its position through the ship, and holds the rider there every tick.
the reason it needs doing at all, the rider’s server position only gets refreshed
while the seat itself is ticked, via rideTick -> positionRider. whenever that
lapses, or the seat is already gone by the time you dismount, LivingEntity
.dismountVehicle takes its fallback branch and puts you at your own position with
y = max(yours, the vehicle’s) instead of the seat’s dismount location. that
fallback never goes through the shipyard to world conversion, so you get dropped
back where you originally mounted instead of on the deck. stale x/z is the “left
behind the ship” one, stale y is the fall damage one.
fair warning if you go digging for the original:
there isnt a clean one. it first went in buried inside a big shitty squashed port commit, so thats useless to read. the link above is a fresh port of it straight onto 1.20.1/main, which is the version
i’d want to PR anyway.
also if i can ask a quick question, since its your call really. i put it in Eureka because
the helm block entity is the thing thats already ticking. but ShipMountingEntity
.positionRider is sitting commented out upstream with a “partial fix, TODO make a
full fix eventually” note, which looks like where you actually wanted this to live.
if youd rather it went in VS2 so it covers anything that mounts a ship seat rather
than just helms, lmk and i can do that. or if you have enough to approch you own way by all means.
is that everything you need?
This conversation is on Discord · Reply there