Farmer's Delight

Farmer's Delight

77M Downloads

[1.19.2]: Backstabbing enchantment causing server crash in niche interaction with Primal Magick

Not-February opened this issue ยท 1 comments

commented

Description

Having a Primal Magick wand in your offhand and using it to cast an offensive spell at an entity's back while a knife with Backstabbing is in your main hand causes a dedicated server to crash. It seems to be something about trying to figure out whether to apply the Backstabbing bonus when the source of the damage is the spell?

I genuinely don't know which mod is to blame for this problem, as both are mentioned in the log/crash and both are technically involved. I'm reporting it to the Primal Magick issue tracker as well just in case.

Steps to reproduce

  1. Have both Primal Magick and Farmer's Delight installed
  2. Inscribe a Primal Magick wand with an offensive spell; in this case, I used an earth damage spell
  3. Enchant a knife with Backstabbing
  4. Equip the knife in your main hand and wand in your offhand
  5. Attack an entity from behind by right clicking with the wand
  6. Watch the game crash

Mod list

https://gist.github.com/Not-February/4c46cf5cc47030e3c7fa2bcc1abedfe1

Logs

Crash log: https://gist.github.com/Not-February/5e32d1290a35f897384cbbdbd252be2a
latest.log: https://gist.github.com/Not-February/30d293dc610cc60f4883ad1b1e8dbacc

Forge

  • I am using the Forge version of Farmer's Delight

Minimal instance

  • I have tested this on a minimal instance

Performance and shader mods

  • I have tested this without performance or shader mods
commented

Hmm... It looks like a related issue might either be highlighting an issue with PM, or creating unintended behavior.

I recently registered bug #581 after a user reported it on Discord, where Backstabbing is influencing the damage of items on the other hand when it shouldn't.

The code calls for a Forge event, and checks some data from the DamageSource, but Primal Magick might not have defined the source position when using it for its spells. Despite this, whether a bug on PM or not, my code should not be running outside of knives to begin with.

This should be fixed once I work on the issue referred above, so I'll close this one and report the fix on the other. ๐Ÿ‘