ewewukek's Musket mod

ewewukek's Musket mod

542k Downloads

crash from shooting self with dispenser

lxative opened this issue ยท 2 comments

commented

Minecraft version

1.20.1

Mod loader you are using

Fabric

Musket Mod version

musketmod-1.20.1-fabric-1.5.3.jar

Modpack info or mod list

cloth-config
fabric-api
musketmod

The latest.log file and hs_err_pidXXX if exists

https://gist.github.com/lxative/7ff526f63141c3005f66c353d239ae99

Issue description

shooting myself with a dispenser crashes the game

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

  1. put paper cartridge in dispenser
  2. activate dispenser to shoot self
  3. reality collapses
commented

yes, it's exactly that line

commented

This seems to happen when any entity is shot by a dispenser.

I'm not a Java programmer, but it looks to me like the issue is with calling .getTeam() on a shooter that's null because it wasn't shot by an entity.

Entity shooter = getOwner();
if (shooter.getTeam() != null && shooter.getTeam().isAlliedTo(target.getTeam())
&& !shooter.getTeam().isAllowFriendlyFire()) {
return;
}