Aizistral-Studios / Enigmatic-Legacy

Remains of the former Minecraftian times.
https://www.curseforge.com/minecraft/mc-mods/enigmatic-legacy
Other
80 stars 47 forks source link

Ring of seven curses #500

Open lab3 opened 6 months ago

lab3 commented 6 months ago

We are getting bug reports on our github that the Ring of Seven Curses is making player's own summoned entities attack them which is surprising because the entities are allied to the player.

Related issue: https://github.com/iron431/irons-spells-n-spellbooks/issues/421

I took a look through your code and pinpointed it to here

https://github.com/Aizistral-Studios/Enigmatic-Legacy/blob/84313580b1072d96528548b01dbdb43c1a1a931a/src/main/java/com/aizistral/enigmaticlegacy/items/CursedRing.java#L373

I would recommend adding an isAlliedTo check which could look like this:

if (!neutral.isAlliedTo(player) && (neutral.getTarget() == null || !neutral.getTarget().isAlive())) {

How to Reproduce:

  1. Add Iron's Spells n' Spellbooks (https://www.curseforge.com/minecraft/mc-mods/irons-spells-n-spellbooks)
  2. Summon anything with a spell (Polar bear, raise dead, etc)
  3. Put on the ring
  4. get attacked by your own summon
CraftyZombie commented 3 months ago

As a temporary fix, you can add the Iron's Spells mobs to the blacklist in the Enigmatic Legacy config.