Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Bedrock player collision (pushing) #1357

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Camotoy
Copy link
Member

@Camotoy Camotoy commented Oct 3, 2020

This isn't perfect! Feel free to play around and critique the code. I'm no expert in collisions, however; I have to thank pokechu22 for giving me some excellent reference code to work with.

Unlike fishing rod pulling behavior that is calculated serverside on Bedrock and clientside on Java, Bedrock player "pushing" is nonexistent on Bedrock. This code checks to see if a Geyser player should be moved, and if so applies motion to the player which sends movement packets back.

This commit also cleans up the move relative code of villagers so they aren't always checking the chunk cache.

Unlike fishing rod pulling behavior that is calculated serverside on Bedrock and clientside on Java, Bedrock player "pushing" is nonexistent on Bedrock. This code checks to see if a Geyser player should be moved, and if so applies motion to the player which sends movement packets back.

This commit also cleans up the move relative code of villagers so they aren't always checking the chunk cache.
@Camotoy Camotoy changed the title Implement Bedrock player collision Implement Bedrock player collision (pushing) Oct 3, 2020
@Camotoy Camotoy marked this pull request as draft October 3, 2020 19:53
}

/**
* Teleports an entity to a new location. Used in JavaEntityTeleportTranslator.
* Teleports an entity to a new location. Used in {@link org.geysermc.connector.network.translators.java.entity.JavaEntityTeleportTranslator}.
Copy link
Member

Choose a reason for hiding this comment

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

I would just import these, it’s much cleaner.

Copy link
Member Author

Choose a reason for hiding this comment

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

For Javadocs?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, intellij should give you a context action to do if

@Camotoy Camotoy added PR: Feature When a PR implements a new feature Work in Progress The issue is currently being worked on. labels Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Feature When a PR implements a new feature Work in Progress The issue is currently being worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants