-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixed Simply Jetpacks integration #38
Conversation
Pelotrio
commented
Jan 26, 2022
- Fixed nullpointer when trying to use a jetpack
- Fixed localization
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 moved the code to init2 and that solved the problem. The init from plustic always runs after the one from SimplyJetpacks because it has this listed as a dependency. I tested this both inside and outside my development environment and it works.
@@ -110,14 +119,10 @@ public String getStateMsgUnloc() { | |||
|
|||
private static final Map<KeyBinding, JetpackSettings> keys = new HashMap<>(); | |||
static { | |||
try { |
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.
A try catch around a map insert does not stop you from inserting null into said map. SimplyJetPacks KeybindHandler gets initialized in init but this gets called in pre init.
.filter(trait -> trait instanceof JetpackPancakeHippos) | ||
.findAny().ifPresent(trait -> { | ||
keys.forEach((key, setting) -> { | ||
if (key.isPressed()) { |
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.
Because this is where the nullpinter happens. Has this been tested at all?
LGTM. Thanks for the email, seems I didn't have notifications for this repo enabled so I didn't see this. Will try to get a build out in a minute with this |
@TeamDman first of all thanks for the quick response time and the relase. As I mentioned in the email, the version number is not replaced correctly in the mcmod.info file and in the main class. For this reason Plustic is shown as version @Version@. This is also the case with the latest version. It's not a big deal, I just wanted to mention it. I can also submit a pull request to fix the build script if you want. |
If you know an easy fix for the version tag stuff then please feel free to PR it |
Yeah I already fixed that in my dev environment because it was annoying me. What issues are you talking about exactly with the jetpack integration? I thought I tested it pretty well and the display messages should now also work. This was all done on with the newest version of Simply Jetpacks 2. |
idk someone in the other issue said they still had a crash, maybe they had an outdated version |
whoops, pasted the link to this PR instead of the issue |
First of all, you have uploaded an incorrect jar. You probably ran the jar instead of the build task. The jar is not obfuscated and causes a crash. I decompiled the jar and confirmed that. The stack trace from the issue is identical to the one before my pr, so it is from an outdated version. Why don't you test once when you or someone else tries to fix something? |
https://howoldisminecraft1122.today/ |
If you merge my pr for the buildscript you should just have to run the build task and it should generate the correct jar. I can also send you my working build if you want to. |
Please try latest build, sorry for the issues. Thanks for the help btw |
Yep it starting just fine and the jetpack integration also works without problems. Thank you very much and nice that you finally tested it :P. |