Skip to content
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

Merged
merged 2 commits into from
Feb 12, 2022
Merged

Conversation

Pelotrio
Copy link

  • Fixed nullpointer when trying to use a jetpack
  • Fixed localization

Copy link
Author

@Pelotrio Pelotrio left a 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 {
Copy link
Author

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()) {
Copy link
Author

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?

@Pelotrio
Copy link
Author

Fixes #33, Fixes #29

@TeamDman TeamDman merged commit 8883c25 into TeamDman:1.12 Feb 12, 2022
@TeamDman
Copy link
Owner

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
Copy link
Owner

https://www.curseforge.com/minecraft/mc-mods/plusticminusbad/files/3645594

@Pelotrio
Copy link
Author

@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.

@TeamDman
Copy link
Owner

If you know an easy fix for the version tag stuff then please feel free to PR it
It seems there's still some issues with the jetpack integration #38 (comment)
I'll try to take a look at it soon hopefully

@Pelotrio
Copy link
Author

Pelotrio commented Feb 12, 2022

If you know an easy fix for the version tag stuff then please feel free to PR it It seems there's still some issues with the jetpack integration #38 (comment) I'll try to take a look at it soon hopefully

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.

@TeamDman
Copy link
Owner

idk someone in the other issue said they still had a crash, maybe they had an outdated version

@TeamDman
Copy link
Owner

whoops, pasted the link to this PR instead of the issue
#33

@Pelotrio
Copy link
Author

idk someone in the other issue said they still had a crash, maybe they had an outdated version

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?

@TeamDman
Copy link
Owner

https://howoldisminecraft1122.today/
will try to get a working build up soon.

@Pelotrio
Copy link
Author

https://howoldisminecraft1122.today/ will try to get a working build up soon.

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.

@TeamDman
Copy link
Owner

TeamDman commented Feb 15, 2022

Please try latest build, sorry for the issues. Thanks for the help btw
https://www.curseforge.com/minecraft/mc-mods/plusticminusbad/files/3648592
Actually launched a multimc instance without crashing this time too :P

@Pelotrio
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants