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

Fix sequence fields #506

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Conversation

supersaiyansubtlety
Copy link
Member

fixes #470

I've also:

  1. eliminated client.multiplayer.prediction and moved its contents to cleint.network: there are only two classes, one of which is a functional interface, and both of which are used for networking
  2. renamed some methods to consistently use BlockUpdate instead of variations on it
  3. renamed PredictiveAction -> PlayerActionPacketFactory:
    • PredictiveAction->PlayerAction: the action itself isn't making a prediction, and the actual packets created are all PlayerAction... or PlayerInteraction...
    • PacketFactory: it's a functional interface whose method creates a packet

Some notes:
all of the indexed actions are player actions that

  • can potentially cause block updates (but some usually don't, item interaction is included)
  • can be rejected by the server

I've chosen "index of player action attempt that could change block state" -> actionIndex

  • no "player" because the fields are in PlayerAction... and PlayerInteraction... packet classes
  • no "attempt" because under normal circumstances the actions succeed (failure usually means lag or cheating)
  • no "could change block state" because I don't know of a concise and non-confusing way to include it (any mention of block makes it sound like item interaction isn't included)

moved contents of client.multiplayer.prediction to client.network,
made some method names consistent with `blockUpdate`,
renamed PredictiveAction
@supersaiyansubtlety supersaiyansubtlety added t: refactor proposes a refactor s: tiny PRs with less than 50 lines labels Oct 4, 2023
@supersaiyansubtlety supersaiyansubtlety marked this pull request as draft October 4, 2023 10:28
@supersaiyansubtlety supersaiyansubtlety marked this pull request as ready for review October 4, 2023 22:31
@supersaiyansubtlety supersaiyansubtlety added the reviews needed please review this PR label Oct 4, 2023
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 5, 2023
@github-actions github-actions bot changed the base branch from 1.20.2 to 23w40a October 5, 2023 01:18
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

🚀 Target branch has been updated to 23w40a

@github-actions github-actions bot added v: snapshot targets a snapshot version of minecraft and removed update-base used to notify github actions that the base branch should be updated labels Oct 5, 2023
Copy link
Member

@ix0rai ix0rai left a comment

Choose a reason for hiding this comment

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

looks great!

@supersaiyansubtlety supersaiyansubtlety added final-comment-period is approved and will soon be merged if no issues are raised and removed reviews needed please review this PR labels Oct 7, 2023
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 16, 2023
@github-actions github-actions bot changed the base branch from 23w40a to 23w41a October 16, 2023 01:25
@github-actions
Copy link
Contributor

🚀 Target branch has been updated to 23w41a

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 16, 2023
@ix0rai ix0rai merged commit 7d14505 into QuiltMC:23w41a Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
final-comment-period is approved and will soon be merged if no issues are raised s: tiny PRs with less than 50 lines t: refactor proposes a refactor v: snapshot targets a snapshot version of minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

int sequence fields are not sequences
4 participants