-
Notifications
You must be signed in to change notification settings - Fork 314
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
Improve structure error feedback #3884
Open
RecursivePineapple
wants to merge
24
commits into
master
Choose a base branch
from
improve-structure-errors
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+298
−23
Open
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
37023cd
Improve structure error feedback
RecursivePineapple a2df4ac
Merge branch 'master' (early part) into improve-structure-errors
RecursivePineapple 1f88b67
Merge branch 'master' into improve-structure-errors
Dream-Master 3c5cc24
Rename status field & use error method for mMachine
RecursivePineapple 53a8a02
Respect shouldCheckMaintenance for maint. hatches
RecursivePineapple 7adcaab
Add steam hatch check for steam multi
RecursivePineapple bf0876f
Merge branch 'master' into improve-structure-errors
RecursivePineapple 42723b8
Merge branch 'master' into improve-structure-errors
Dream-Master 6824c91
Merge branch 'master' into improve-structure-errors
Dream-Master 48100f9
Merge branch 'master' into improve-structure-errors
Dream-Master a4e22ba
Merge branch 'master' into improve-structure-errors
Dream-Master ea5dd6c
Merge branch 'master' into improve-structure-errors
Dream-Master c1fa56d
Merge branch 'master' into improve-structure-errors
Dream-Master c3d01c3
Made error field private & added synced NBT param
RecursivePineapple 2e58f63
Merge branch 'master' into improve-structure-errors
RecursivePineapple 51e9711
Merge branch 'master' into improve-structure-errors
serenibyss 15dc427
Merge branch 'master' into improve-structure-errors
Dream-Master a1911d1
Merge branch 'master' into improve-structure-errors
Dream-Master 9dbe1f1
Merge branch 'master' into improve-structure-errors
Dream-Master 47bca43
Changes from review comments
RecursivePineapple 8f1fa74
Merge branch 'master' into improve-structure-errors
Dream-Master 693f72a
Merge branch 'master' into improve-structure-errors
Dream-Master 2fc3186
Merge branch 'master' into improve-structure-errors
Dream-Master 953cc13
Merge branch 'master' into improve-structure-errors
Dream-Master File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package gregtech.api.enums; | ||
|
||
/** | ||
* Used as a bit set for {@link gregtech.api.metatileentity.implementations.MTEMultiBlockBase#mStructureErrors}. | ||
* You can reorder these as needed. | ||
*/ | ||
public enum StructureError { | ||
MISSING_MAINTENANCE, | ||
MISSING_MUFFLER, | ||
UNNEEDED_MUFFLER, | ||
TOO_FEW_CASINGS, | ||
MISSING_CRYO_HATCH, | ||
TOO_MANY_CRYO_HATCHES, | ||
MISSING_STEAM_HATCH; | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SideOnly
usages should be restricted where it would cause crash if not present. It can be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use
I18n.format
for i18n, andI18n
is client-only. It doesn't make sense to run this on the server either, since it relies on the user's language. We could just use the server's lang, but I don't think that's a good idea.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean to make it available on server, what I meant is you can just remove this annotation.
@SideOnly
is for stripping the member on runtime, not for marking "Don't use this on server." If the intention is to ensure that it won't get called on server, Java compiler cannot understand this and lets anyone to access it on server side, causingNoSuchMethodError
on runtime. If any, adding Javadoc saying "Don't use this on server" is enough.