Skip to content

Conversation

jpenilla
Copy link
Contributor

@jpenilla jpenilla commented Feb 26, 2025

  • Adjusts look angles for a more seamless transition instead of snapping to looking directly away from the exit portal.
  • Use entity and portal bounding box sizes to offset destination position from portal position instead of hardcoded values. This should improve handling for different sized entities. We add Shapes.EPSILON to the final position to avoid immediately colliding with the destination portal (this particular epsilon is not required, but we need one).
  • Add destination position offsets for keeping the entity's BB within the exit portals top/bottom when exiting horizontal portals. This prevents the entity from exiting into blocks adjacent to the portal and taking suffocation damage.

- Adjusts look angles for a more seamless transition instead of snapping to looking directly away from the exit portal. See Javadoc on PortalEntity#transformLookAngle for more details.
- Use entity and portal bounding box sizes to offset destination position from portal position instead of hardcoded values. This should improve handling for different sized entities. We add Shapes.EPSILON to the final position to avoid immediately colliding with the destination portal (this particular epsilon is not required, but we need one).
- Add destination position offsets for keeping the entity's BB within the exit portals top/bottom when exiting horizontal portals. This prevents the entity from exiting into blocks adjacent to the portal and taking suffocation damage.
Reuse existing logic from the motion translation
Copy link
Collaborator

@MichaelHillcox MichaelHillcox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look solid but I'd need to pull into the game and test properly. @Direwolf20-MC This is likely worth testing and pulling in if it works as you're expecting it to

@Direwolf20-MC
Copy link
Owner

Sorry it took me so long to get around to trying this :). Life's been busy and i haven't had a chance to work on my mods for a bit.

I tested this and it feels pretty good :). I'll go ahead and pull it in, and see how the response from the playerbase is.

Thank you for this!

@Direwolf20-MC Direwolf20-MC merged commit 6577fdc into Direwolf20-MC:main Mar 29, 2025
1 check passed
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