FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Viewer#sendBlockProgress by MrHell228 · Pull Request #2513 · SpongePowered/SpongeAPI · GitHub

Add Viewer#sendBlockProgress - #2513

Merged
Faithcaio merged 6 commits into
SpongePowered:api-11from
MrHell228:api-11-cracks
Jun 23, 2024
Merged

Add Viewer#sendBlockProgress#2513
Faithcaio merged 6 commits into
SpongePowered:api-11from
MrHell228:api-11-cracks

Conversation

MrHell228 commented Jun 2, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

SpongeAPI | Sponge

* @param y The y position
* @param z The z position
*/
void resetBlockProgress(int x, int y, int z);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is leaking impl details, please remove this method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Wdym it's impl detail. It's must have method if we make limits (from 0 to 1) for progress arg in sendBlockProgress

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The server doesn't need any knowledge of the current progress. This is leaking impl details by forcing implmentations to track the progress

MrHell228 Jun 2, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Server doesn't have any knowledge of the current progress. It resets only progress that was sent by sendBlockProgress() so the only knowledge server has is that some plugins used sendBlockProgress()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think resetBlockProgress is necessary because we need a way to remove the crack.
Notes:

  1. setting progress to 0 does not remove, it just means you began cracking the block.
  2. as discussed on discord, we will not track progress, however we need to keep somewhere a map of blockpos to destruction id

Faithcaio merged commit eea04ca into SpongePowered:api-11 Jun 23, 2024
MrHell228 deleted the api-11-cracks branch June 23, 2024 22:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL