Delay model update to stop flickering #484

Merged
ferriarnus merged 1 commit from modelUpdates into dev/1.20.1 2023-10-19 18:52:18 +00:00
ferriarnus commented 2023-08-20 21:46:48 +00:00 (Migrated from github.com)

Description

Right now when a recipe is done the machine models turns off for a tick. The update is now delayed a tick, making it not flicker if it found a new recipe in the next tick.

Closes #(issue)

Todo

  • Things that are yet to be completed for this PR to no longer be a draft.

Checklist:

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you).
  • I have performed a self-review of my own code.
  • I have commented my code in areas it may be challenging to understand.
  • I have made corresponding changes to the documentation.
  • My changes are ready for review from a contributor.
# Description Right now when a recipe is done the machine models turns off for a tick. The update is now delayed a tick, making it not flicker if it found a new recipe in the next tick. Closes #(issue) <!-- Follow this exact pattern for every issue you've fixed to help GitHub automatically link your PR to the relevant issues --> <!-- Remove this section if you're submitting an already-complete PR --> # Todo - [ ] Things that are yet to be completed for this PR to no longer be a draft. <!-- For drafts, fill this in as you go; if you are leaving draft, make sure these are all done --> # Checklist: - [ ] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you). - [ ] I have performed a self-review of my own code. - [ ] I have commented my code in areas it may be challenging to understand. <!-- (Although we prefer code that is readable instead of over-commented) --> - [ ] I have made corresponding changes to the documentation. - [ ] My changes are ready for review from a contributor. <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template -->
Rover656 commented 2023-10-13 15:08:40 +00:00 (Migrated from github.com)

This solution looks like it'll fix the problem you outlined -but- potentially the problem here is that we should not be wasting that tick? Maybe as a solution to the root problem, when a craft completes we should try and enqueue the new recipe immediately

This solution looks like it'll fix the problem you outlined -but- potentially the problem here is that we should not be wasting that tick? Maybe as a solution to the root problem, when a craft completes we should try and enqueue the new recipe immediately
ferriarnus commented 2023-10-18 09:35:30 +00:00 (Migrated from github.com)

We could yeah, though this is similar to what for example mekanism does, and user won't notice the 1 tick delay, so imo we don't need to make it more complex.

We could yeah, though this is similar to what for example mekanism does, and user won't notice the 1 tick delay, so imo we don't need to make it more complex.
Rover656 commented 2023-10-19 18:52:15 +00:00 (Migrated from github.com)

We could yeah, though this is similar to what for example mekanism does, and user won't notice the 1 tick delay, so imo we don't need to make it more complex.

Yeah that's fair - gonna merge this then, cheers Ferri!

> We could yeah, though this is similar to what for example mekanism does, and user won't notice the 1 tick delay, so imo we don't need to make it more complex. Yeah that's fair - gonna merge this then, cheers Ferri!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#484
No description provided.