iPortalTeam / ImmersivePortalsMod

Non-Euclidean in Minecraft. See through portals and teleport seamlessly.
https://qouteall.fun/immptl/
Apache License 2.0
444 stars 106 forks source link

Minecarts don't smoothly transition through portals #681

Open NikkeKatski opened 3 years ago

NikkeKatski commented 3 years ago

I have a feeling that this is more of an issue with how Minecraft handles moving minecarts but it'd be sick if you could fix this somehow.

gear54rus commented 5 months ago

@qouteall Why is this marked low prio? This seems like it could be another defining feature of this mod. Vanilla notoriously doesn't allow minecarts with entities to pass for example and fixing that in IP could enable smooth nether-enabled fast transportation networks (like the one I'm building :).

gear54rus commented 5 months ago

Or maybe you have some pointers on why it's hard to fix? like notes or something (relevant methods/classes). I could try to research and make a PR for that myself if given some hints (I never wrote any Java in my life but did modify several Java programs on bytecode level).

I can see there's MC 67 https://bugs.mojang.com/browse/MC-67 that's been open 12 years now lol. So I assume some kind of huge modification to portal code is needed but I can't see how it's so difficult if non-mounted entities (empty or storage minecarts) can already pass no problem.

qouteall commented 5 months ago

@gear54rus It involves position synchronization and interpolation of entities which is not easy to solve. I haven't looked into this issue deeply. Contributions are appreciated.

qouteall commented 5 months ago

In MC, the client player's movement is mainly determined by client side and synchronized to server side (server side validates the movement and send teleport packet to client if invalid). The position of non-client-player entities are determined by server side and is interpolated. So making non-client-player-entity to smoothly transition through portal requires different techniques than client player.

gear54rus commented 5 months ago

Makes sense. I can see how player entities might be an issue, but for example mobs would not have this problem right? I assume they are controlled by server.

If a minecart can pass through portal OK and a sheep can do the same, then both of them together should be able to? Or are there similar hidden issues?

qouteall commented 5 months ago

I think this issue is for visual smoothness of non-client-player teleporting (the visual smoothness issue applies for both minecart and non-minecart entities). You seem to mean the issue that minecart with passengers not teleporting through portal. They are two different issues.

gear54rus commented 5 months ago

oh yeah... I just realized I started this discussion in the wrong issue haha