-
Notifications
You must be signed in to change notification settings - Fork 33
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
1.19-1.20 successful load #121
Conversation
Nerd (I'll check this out later today :) ) |
Oki dokie! So, we do not want to add Commons Lang (as discussed in discord, not wrong by any means, just not what we want here :) ) So, for all the current For the IntRange usages, you'll just want a new class that has min, max and contains as this is the only methods I can see used in the plugin, should be an easy class to make an substitute but I'm happy to handle that part if you prefer? StringUtils is used a few times. For the two instances of That should clear all of the usages of You know where I am so hit my on discord with any finite questions or is you want me to push anything to your branch to help out :) Love that you've been willing to take this one. Would be interested to hear @TheBusyBiscuit 's views also as he may have some better solutions to what I've put here/possibilities for items to add to dough? |
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.
687deb2
First was removing the commons-lib
, and replacing many of the org.apache.commons.lang
with com.google.common.base
. Mostly Validate
-> Preconditions
as suggested. I did not understand the key difference between Validate.isTrue
, Validate.notNull
, and Validate.noNullElements
. In all cases, I used Preconditions.checkArgument
just based off the suggestion. I did read some other similar functions like Preconditions.checkNotNull
, but I tried to stick with as basic as possible.
I replaced StringUtils.isNumeric
with STBUtil.isNumeric
. It didn't throw errors, but with most things I'm not sure if this is proper.
6cb951a
This was the hardest part by far and I am sorry if I did something wrong. First thing, figuring out classes needing to be its own file through me through a loop, so I winged it and put them in io.github.thebusybiscuit.sensibletoolbox.utils
. I hope this is correct.
Second, I named them the same as what I was replacing: IntRange
and WordUtils
(<-- WordUtils was a curveball). For both IntRange
and WordUtils
, I just tried to do what apache-commons did. No errors, so assume correct again.
For the WordUtils
, I double checked after compiling that signs on BSU's and HSU's are proper, and seem to be:
2ad4438
Here I just replaced the imports and fixed the some of the old statements mostly regarding IntRange
. Theres a Validate.isTrue
in there that was replaced with Precondistions.checkArgument
as well. No errors, so I'm assuming something is correct!
Overall, the plugin loaded, and worked after making all these changes. I am sure something or everything is completely wrong, so I welcome my next set of fixes :D
Thank you so much @Sefiraat for guiding me through this process.
src/main/java/io/github/thebusybiscuit/sensibletoolbox/api/items/BaseSTBMachine.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/IntRange.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/WordUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/WordUtils.java
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/sensibletoolbox/utils/WordUtils.java
Show resolved
Hide resolved
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 think I'm happy with all of this now. I would like cookie's opinion on the WordUtils class as I'm not entirely sure about that one (but do not have a better suggestion outside of reinventing the wheel).
The only reason im not marking this as approved now is I want to build and test after work today :)
Please try to remember that people have their own real lives, issues and work/school. Destructive comments like this are not useful in any way, shape or form and are simply not welcome. I cannot speak for cookie but I will not receive any comment like this well. |
Are you update this 1.19,1? |
any news? |
#751a7fa Is a 1.20 successful load. Like the previous, this is only for basic functionality. |
Description
Attempted to update STB to successfully load in 1.19, no other goals.
Changes
Updated dependencies, added MC 1.19 to versions, and attempted to pass the plugin instance inside ProtectionManager
Related Issues
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values