Spartan Weaponry

Spartan Weaponry

34M Downloads

Issue With Shoulder's Surfing Mod and Spartan Weaponry Not Working Together.

super82635 opened this issue ยท 9 comments

commented

I'm having an issue with forge 1.18.2 with with shoulder's surfing mod and spartan weaponry working together that when I have a throwable weapon in my hand and I'm on the shoulder's surfing perspective view, my health bar, hunger bar, and XP bar are gone, and when I ever try to go to game menu or press E (opening my inventory screen), it crashes the game completely and gives a
"java.util.NoSuchElementException: null".

Screenshot 2024-02-11 165507

Screenshot without the spartan weaponry's throwable weapons:
2024-02-11_16 59 27

Screenshot with one of the spartan weaponry's throwable weapons:
2024-02-11_16 57 27

commented

I can't seem to reproduce the issue so far.
What mods do you have that modifies the HUD? I suspect that one of those mods might be causing this issue in tandem with mine

commented

I found the issue, so apparently the issue was that in the config of shoulder surfing itself that changing the crosshair type to "dynamic" is what causes the issue.

commented

Oh that's nice to know. I'll see if there is a way to prevent this issue from happening on my end.

commented

I was able to replicate the crash with the crosshair type set to dynamic in the config.
As a result I figured out why the game is crashing.
The Shoulder Surfing mod seems to not like when my mod disables vanilla Minecraft's crosshair overlay (to draw a custom crosshair instead) and throws a lot of exceptions when holding a throwing weapon or a heavy crossbow. It will only crash though when you try and pause the game while holding those weapons.
I have changed how the crosshair is being disabled and that has stopped the crashing and the non-fatal thrown exceptions too.
I've even added extra integration so that the custom crosshairs are offset by the dynamic crosshair option.
This will be in the next update for the MC 1.18.2 and 1.19.2 versions

commented

I've released version 3.0.5 that has resolved the crashing problem with Shoulder Surfing Reloaded and I even went further and added proper integration with the dynamic crosshair too! My mod's custom crosshairs will now offset properly and the numeric values (e.g. for throwing weapons and oils) won't move.
Closing issue as it's resolved.

commented

still happens on 1.19.2

commented

When your game crashes, it should generate a crash report in the "crash-reports" folder. Can you reproduce the crash and send me the latest crash report? This will help me figure out what is causing this.

commented

forgot to mention that the crash happens only when I press game menu key while having a javelin or a throwing knife on hand while on shoulder's surfing perspective.