desht / ModularRouters

A Forge Mod for item routers with pluggable modules
16 stars 20 forks source link

Modular Router Issue with Capuring Enchant #211

Closed AlmightyAnubis closed 5 months ago

AlmightyAnubis commented 5 months ago

Describe the bug

I got this Crash Report. I am not sure, if it is on the side of Modular Routers, Iron Spells and Spellbooks or apotheosis but the interaction seams to be the issue. The capturing enchantment seems to cause an issue with the router.

How to reproduce the bug

Get Capturing on a Sword I attacked the Iron Spells and Spellbooks Dead King using a Router with a Sword with Capuring (Modpack All the mods 9) It crashed

Expected behavior

Not to crash I guess. Seems like a Null check is missing

Additional details

No response

Which Minecraft version are you using?

1.20

Crash log

https://pastebin.com/kprzUQrj

desht commented 5 months ago

I don't believe this is Modular Routers, no. The crash is when Apotheosis tries to drop a spawn egg for the mob that's just been killed, at https://github.com/Shadows-of-Fire/Apotheosis/blob/1.20/src/main/java/dev/shadowsoffire/apotheosis/spawn/enchantment/CapturingEnchant.java#L50

Looks like ForgeSpawnEggItem.fromEntityType() is returning null for this Summoned Zombie type, so I'd suggest talking to the owners of those two mods to determine how to handle this situation.