Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Entities dont get teleported via gateway when riding in minecart

Open TureBentzin opened this issue 1 year ago • 19 comments

Expected behavior

Like Vanilla the gateway should work normal:

Video (provided by Jokni): https://cdn.discordapp.com/attachments/289587909051416579/1101915124022919238/2023-04-29_19-56-25.mp4 (expected behavior)

Observed/Actual behavior

Video (provided by Jokni): https://cdn.discordapp.com/attachments/289587909051416579/1101915053629915146/2023-04-29_19-51-03.mp4 - observed behavior

Steps/models to reproduce

Follow the video for reproduction on vanilla and on paper.

Alternative:

  1. Go into the "end"
  2. place or locate a gateway
  3. Force an entity (riding in a cart) into the gateway

Plugin and Datapack List

We could not figure out any correlation between datapacks or plugins (tests where done with and without them)

Paper version

git-Paper-521 (MC: 1.19.4)

Other

Thanks to "Icen" for reporting the issue

TureBentzin avatar Apr 29 '23 18:04 TureBentzin

Presumably related to #6658

lynxplay avatar Apr 29 '23 21:04 lynxplay

Would have to re-evaluate if https://github.com/PaperMC/Paper/issues/3297 still applies. Beyond that, this seems intended.

lynxplay avatar May 01 '23 09:05 lynxplay

just had the same issue would be great to get a fix for it!

Tizooo avatar May 01 '23 16:05 Tizooo

In testing I've found that if I remove server patch:

0409-Ensure-safe-gateway-teleport.patch

Results in entities in minecarts getting teleported through end gateways just fine

brwnie avatar May 09 '23 19:05 brwnie

@kickash32 - author of the patch

That might be caused by the cards wrongfully indicating in the canChangeDimension that they can't use the portal. I'm on mobile right now so its hard to debug this method right now.

TureBentzin avatar May 09 '23 20:05 TureBentzin

Looks like that function (canChangeDimensions) checks if the entity is not a passenger and is not a vehicle

brwnie avatar May 09 '23 20:05 brwnie

Then that would be the "issue". We could remove the check but I expect this to have consequences. If we decide that ditching the vehicle check would be ok I will pr this in.

TureBentzin avatar May 10 '23 09:05 TureBentzin

Yea as stated, this needs a revisit of the issue I linked above. I am without a proper work setup for the rest of the week sadly, but I can try to test the behaviour the patch is trying to prevent without the patch in the latest version.

Especially the "player with an entity on its head" part is of interest.

lynxplay avatar May 10 '23 13:05 lynxplay

I tried reproducing: I placed a cat (the entity) on my head, crawled to the end gateway using trapdoors, and was able to /home succesfully using EssentialsX.

Place an entity on your head.
Enter an end gateway using trapdoors.
Try a command like /home from EssentialsX and watch it fail.

After /home the cat was no longer on my head, but going through the end gateway again it was there pre /home.

Video: https://www.youtube.com/watch?v=ilSD0W3tAjY

Some background on my interest in this issue: As part of one of the advancements of Minecraft 'How did we get here' it involves having every effect applied at once.

Using an end gateway in vanilla way makes it much easier to get a Shulker close to the end portal to eventually get in the overworld, with this not working it may mean a 1000+ block journey or a fustrating experience getting the shulker into the gateway without it being a passenger

brwnie avatar May 10 '23 19:05 brwnie

I think we may as well just make this a config option if we don't have the resources to do the indepth testing on the initial patch that introduced this "bug".

lynxplay avatar May 24 '23 16:05 lynxplay

Initial draft of a potential fix available at #9521. I have enabled a build job for the PR so you can grab the paper plugin if you want to try the fix.

This should properly allow entities to teleport via end gateways if they are used as vehicles.

lynxplay avatar Jul 22 '23 21:07 lynxplay

Initial draft of a potential fix available at #9521. I have enabled a build job for the PR so you can grab the paper plugin if you want to try the fix.

This should properly allow entities to teleport via end gateways if they are used as vehicles.

Thanks @lynxplay, I tried the fix and Shulkers in Minecarts go through fine now.

I did observe with this that if a player is in a Minecart, it almost 'softlocks' them before entering the gateway. If the player quits and rejoins they respawn through the gateway OK. If a player is not in a Minecart (crawls through) they go through OK.

brwnie avatar Jul 23 '23 14:07 brwnie

iirc this is a vanilla bug ? At least I can replicate that in vanilla.

lynxplay avatar Jul 24 '23 09:07 lynxplay

I did some testing and found that this bug came about in version git-Paper-449 (MC: 1.19.4). This bug did not exist in version git-Paper-448 (MC: 1.19.3).

Xavom avatar Jul 28 '23 05:07 Xavom

In testing I've found that if I remove server patch:

0409-Ensure-safe-gateway-teleport.patch

Results in entities in minecarts getting teleported through end gateways just fine

How to remove server patch?

PeterL07590759 avatar Aug 20 '23 02:08 PeterL07590759

In testing I've found that if I remove server patch: 0409-Ensure-safe-gateway-teleport.patch Results in entities in minecarts getting teleported through end gateways just fine

How to remove server patch?

Please use our Discord or forums for support and not the GitHub issues.

Nacioszeczek avatar Aug 20 '23 03:08 Nacioszeczek

Any updates on this issue? it seems that the fix pull request was closed and the issue discussion just died. I can confirm that this is still an issue and not the vanilla behaviour.

LoaiDev avatar Feb 24 '24 12:02 LoaiDev

After rebasing the PR, the minecart deadlock seems fine now :+1: I'll reopen the PR for testing.

lynxplay avatar Feb 24 '24 13:02 lynxplay

#10283 is opened and provides a jar for testing. It looks fine to me (specifically I was not able to deadlock myself when riding a minecart through the portals).

Feel free to test the PR extensively with weird shenanigans, I'll try to get towards testing it more after my schedule is less filled by uni related work.

lynxplay avatar Feb 24 '24 13:02 lynxplay

Merged the fix in :+1: If any of you run into the previously mentioned deadlock that existed in 1.18, please open an issue! We have not been able to replicate that, so believe the patch is safe to merge as there is also no indiciation for that deadlock to appear again under the new chunk system.

lynxplay avatar Mar 10 '24 00:03 lynxplay