Fix SyncHandlers not being set by method during initialization#176
Merged
brachy84 merged 2 commits intoCleanroomMC:masterfrom Nov 27, 2025
Merged
Fix SyncHandlers not being set by method during initialization#176brachy84 merged 2 commits intoCleanroomMC:masterfrom
brachy84 merged 2 commits intoCleanroomMC:masterfrom
Conversation
also did a bit of refactoring add a bit of javadoc
Member
|
Should this be done for every widget using sync handlers? |
Contributor
Author
|
what do you mean exactly? are there any widgets that implement ISynced but don't extend |
Member
yes |
make sure the sync handlers are set correctly improve the setValue javadoc a bit also check if it's a valid synchandler
Contributor
Author
|
i would say it's a good idea, as it shows how someone should implement this method. |
brachy84
approved these changes
Nov 27, 2025
brachy84
pushed a commit
to brachy84/ModularUI2-GTNH
that referenced
this pull request
Nov 27, 2025
…roomMC#176) * it works now also did a bit of refactoring add a bit of javadoc * refactor the other classes' `isValidSyncHandler()` make sure the sync handlers are set correctly improve the setValue javadoc a bit also check if it's a valid synchandler (cherry picked from commit b3fa473)
brachy84
added a commit
to brachy84/ModularUI2-GTNH
that referenced
this pull request
Nov 27, 2025
(cherry picked from commit 34dd086)
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Call
setSyncHandler()duringinitialiseSyncHandler()so that overriding classes can set their own instance of their sync handler. (as noted in javadoc)make
isValidSyncHandler()just be instanceof checks for ItemSlots and PhantomItemSlotscheck if SH is not null before isValid check in ModularPanel
also fixes issues when using PhantomItemSlots in DynamicSyncedWidgets