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

Projectile Movement #1929

Merged
merged 18 commits into from
Feb 19, 2021
Merged

Projectile Movement #1929

merged 18 commits into from
Feb 19, 2021

Conversation

davchoo
Copy link
Member

@davchoo davchoo commented Feb 15, 2021

@@ -117,8 +182,10 @@ protected float getDrag(GeyserSession session) {
*/
protected boolean isInWater(GeyserSession session) {
if (session.getConnector().getConfig().isCacheChunks()) {
int block = session.getConnector().getWorldManager().getBlockAt(session, position.toInt());
return block == BlockTranslator.BEDROCK_WATER_ID;
if (0 <= position.getFloorY() && position.getFloorY() <= 255) {
Copy link
Member

@Camotoy Camotoy Feb 15, 2021

Choose a reason for hiding this comment

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

Just as a general note, it might be a better idea to move this as a precheck for getBlockAt. You can get a similar error if you place a block at Y256 because of the resulting block update packet. No need to change this code for the time being, and you're certainly not obligated to do this yourself - this change belongs in a separate PR.

@Camotoy
Copy link
Member

Camotoy commented Feb 15, 2021

Poggers

@davchoo
Copy link
Member Author

davchoo commented Feb 17, 2021

1ad9166 should also fix #1935

@Camotoy
Copy link
Member

Camotoy commented Feb 18, 2021

Game-wise, everything looks fine, except.

I threw my fishing rod and I started lagging client-side - my frames just dropped, and this did not happen without this PR. I'm not sure why, but I'm happy to help look tomorrow if need be.

@davchoo
Copy link
Member Author

davchoo commented Feb 18, 2021

Very strange, I can confirm this happens on an IPad Air, but not on Windows 10 edition. It seems to be due to the bounding box height I've set in the constructor.

Copy link
Member

@Camotoy Camotoy left a comment

Choose a reason for hiding this comment

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

Update the mappings to the latest Geyser master, and then this is set to go.

@@ -47,4 +49,17 @@ public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession s

super.updateBedrockMetadata(entityMetadata, session);
}

@Override
public void setRotation(Vector3f rotation) {}
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment in the method body explaining the arrow rotation, if you would.

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.

None yet

3 participants