ewewukek / mc-musketmod

Mod that adds craftable flintlock weapons
MIT License
13 stars 22 forks source link

Mod crashes when you summon a bullet and it hits a mob #53

Open Elextro-B opened 5 days ago

Elextro-B commented 5 days ago

Minecraft version

1.21.1

Mod loader you are using

Forge

Musket Mod version

musketmod-1.21.1-fabric-1.5.3

Modpack info or mod list

A heavily modified version of Fabulously Optimised. I don't think any of the other mods are causing it

The latest.log file and hs_err_pidXXX if exists

https://pastebin.com/GWAhaRpa

Issue description

When you summon a bullet, it just falls to the ground and makes a dirt block-breaking noise. But if it hits a mob, the entire game crashes, and the world is now hard locked with the game crashing every time I try to get into it. After looking through the crash log, the most likely reason is that since there is no "shooter" (since the bullet was summoned rather than shot), the game doesn't know who shot the bullet which crashes the game. I'm basing this off the main error which says the "shooter" is null

This seems to be the main error: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1297.method_5781()" because "shooter" is null

I don't think this is a high-priority issue since you need commands to summon a bullet but it still crashes the game which probably makes it a bug.

Steps to reproduce (if reproducing the issue requires exact steps)

  1. Summon a bullet on top of a mob
  2. Crash
Elextro-B commented 5 days ago

Here's a video

https://github.com/user-attachments/assets/b25b5838-eb13-4d83-8a7b-716391126aaa