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

Send nearby packets from world list instead of server list #1196

Merged
merged 1 commit into from Aug 17, 2018

Conversation

Mystiflow
Copy link
Contributor

No description provided.

@Mystiflow Mystiflow changed the title Send from world Send nearby packets from world list instead of server list Jul 5, 2018
Copy link
Member

@aikar aikar left a comment

Choose a reason for hiding this comment

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

the player can be null

@Mystiflow
Copy link
Contributor Author

Mystiflow commented Jul 18, 2018

This PR is ready for further review.

I've addressed your issue above.

Also I've expanded this PR to send nearby packets using the world field instead of dimension field as the predicator of which world to send the packets to. Previously they were sent by the same dimension;- so if there were 2 worlds with same dim in server - one player could send a packet to another in a parallel world (if they were within coords/nearby), which is incorrect.

I do however still need to add some missing comments to annotate the changes from this.world to this.world.dimension.

    No need to look in all servers

    Also makes it so nearby packets are sent from the world and not
    dimension. Because you can have two worlds with the same dimension in
    the server and hearing things like attack sound packets from another
    world in same dim is not ideal.
@aikar aikar merged commit 51e29fb into PaperMC:master Aug 17, 2018
aikar added a commit that referenced this pull request Aug 19, 2018
* pre/1.13: (45 commits)
  [CI-SKIP] Remove old optimize hopper patch from removed
  Restore Optimized Hoppers patch
  [CI-SKIP] Remove some unneeded patches from removed folder
  restore vanilla default mob-spawn-range
  Fix some performance regression in last patch
  Don't iterate twice - Fixes GH-1346
  Send nearby packets from world list instead of server list (#1196)
  [CI-SKIP] [Auto] Rebuild Patches
  1.13: Player launch projectile event (#1249)
  Allow Blocks to be accessed via a long key (#1335)
  Optimize BlockPosition helper methods (#1339)
  Fix watchdog restarting on short timeout (#1344)
  [Auto] Updated Upstream (Bukkit/CraftBukkit)
  Cleanup javadoc warnings for 1.13
  Cleanup javadoc warnings
  [Auto] Updated Upstream (Bukkit)
  Fix bug in last patch
  Ensure chunks are always loaded on hard position sets
  Improve Watchdog Early Warning Feature - Closes #1319
  [Auto] Updated Upstream (CraftBukkit)
  ...
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