Old Guns Mod

Old Guns Mod

397k Downloads

1.18.2 Old Guns crashes when you hover over guns with shift on, and shift click into inventory

GoldenDash2 opened this issue ยท 3 comments

commented

Describe the bug
When you hold shift and hover over the guns with your cursor, it immediately crashes the game. Also does this when you shift click guns into inventory or to delete into creative inventory

To Reproduce
Steps to reproduce the behavior:

  1. Hold shift over gun, then move to the next in creative inventory
  2. Game Crashes

Expected behavior
For the game not to crash and merely show stats of the next gun over, olr be transported into inventory
Screenshots
If applicable, add screenshots to help explain your problem.

Mod Version
[eg. v1.18.1-3.2.0-24]

Mod List

oldguns_v1.18.1-3.2.0-24.jar
jei-1.18.1-9.2.1.69.jar
...
commented

https://pastebin.com/cqe5jGd5

Crash Report in the paste bin

commented

Need a crash log attached/linked.

commented

Primal Magick looks to be trying to get ingredients from old guns recipes, via generateItemAffinityValuesFromIngredients(...), which blows up since ForgeHooks.getCraftingPlayer() returns null for some reason when calling damageItem(...) in some recipes. I can add a null check to prevent the crash.