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+clarify ChunkTickScheduler, complete n.m.world.tick #640

Merged
merged 6 commits into from
Oct 6, 2024

Conversation

supersaiyansubtlety
Copy link
Contributor

@supersaiyansubtlety supersaiyansubtlety commented Sep 17, 2024

When adding a block tick scheduler to one of my mods I was dismayed to find ChunkTickScheduler had three fields that seemed very similar:

Queue<OrderedTick<T>> tickQueue;
List<Tick<T>> ticks;
Set<OrderedTick<?>> queuedTicks;

I was also surprised that void disable(long time) was the method responsible for making sure deserialized ticks actually get scheduled.

I've renamed them:

Queue<OrderedTick<T>> scheduledTicks;
List<Tick<T>> initialTicks;
Set<OrderedTick<?>> allTicks;
//...
void scheduleInitialTicks(long time)

I also added some javadocs clarifying how initialTicks works and renamed things to more consistently use "schedule".


Now also completes n.m.world.tick

@supersaiyansubtlety supersaiyansubtlety changed the title fix+clarify ChunkTickScheduler memeber and related names fix+clarify ChunkTickScheduler member and related names Sep 17, 2024
@supersaiyansubtlety supersaiyansubtlety self-assigned this Sep 17, 2024
@supersaiyansubtlety supersaiyansubtlety added t: refactor proposes a refactor v: snapshot targets a snapshot version of minecraft reviews needed please review this PR s: tiny PRs with less than 50 lines labels Sep 17, 2024
@ix0rai ix0rai self-requested a review September 18, 2024 02:43
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Sep 18, 2024
Copy link
Contributor

🚀 Target branch has been updated to 24w38a

@github-actions github-actions bot changed the base branch from 24w37a to 24w38a September 18, 2024 23:10
@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Sep 18, 2024
@OroArmor
Copy link
Member

You should take a look at the new world interface that exists now

@supersaiyansubtlety
Copy link
Contributor Author

supersaiyansubtlety commented Sep 19, 2024

You should take a look at the new world interface that exists now

C_adoatlrf ?

that does look tick-y

@OroArmor
Copy link
Member

probably. ScheduledTickAccess in MM

move TickPriority to tick package
complete n.m.world.tick
@supersaiyansubtlety supersaiyansubtlety changed the title fix+clarify ChunkTickScheduler member and related names fix+clarify ChunkTickScheduler, complete n.m.world.tick Sep 20, 2024
@supersaiyansubtlety supersaiyansubtlety added s: small PRs with less than 200 lines and removed s: tiny PRs with less than 50 lines labels Sep 20, 2024
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 good, great refactors!

@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 1, 2024
@github-actions github-actions bot changed the base branch from 24w38a to 24w39a October 1, 2024 15:08
Copy link
Contributor

github-actions bot commented Oct 1, 2024

🚀 Target branch has been updated to 24w39a

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 1, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

🚀 Target branch has been updated to 24w40a

@github-actions github-actions bot changed the base branch from 24w39a to 24w40a October 3, 2024 00:36
@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 3, 2024
@ix0rai ix0rai 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 3, 2024
@ix0rai ix0rai merged commit b2aa2b7 into QuiltMC:24w40a Oct 6, 2024
2 checks passed
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: small PRs with less than 200 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.

3 participants