-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
base: master
Are you sure you want to change the base?
Conversation
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.
connector/src/main/java/org/geysermc/connector/entity/Entity.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
/** | ||
* 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}. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Javadocs?
There was a problem hiding this comment.
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
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.