MarkusBordihn / BOs-Easy-NPC

Create easily NPC for your world or for your mod.
Other
19 stars 7 forks source link

[Crash Report] Incompatibility with Arc Lib #280

Closed tooopt closed 1 month ago

tooopt commented 1 month ago

Minecraft and Mod version 🐞 1.20.1 Forge 5.4.1 EasyNPC version

Description of the crash 💥 If EasyNPC and arc lib are installed, when you spawn an npc, the game crashes

Steps to reproduce the crash ⚙️

  1. Install easynpc
  2. Install ArcLib with dependencies (Arclib, Architecturyapi, UI Lib, SuperMartijn core lib and SuperMartijn config lib)
  3. Launch the game, create a new world and spawn an npc

Expected behavior before the crash ✔️ Expected behavior would be to spawn an npc

Logs 📝

debug log - https://pastebin.com/yTZtG5v4 crash.log - https://pastebin.com/xtCvhDgC

Additional context 📋 Side note that the mod is incompatible only with arclib in this situation, If you delete arclib but leave the dependencies, everything works normally

MarkusBordihn commented 1 month ago

Thank you for the report.

The issue lies with ArcLib itself and its use of the mixin definition. https://github.com/DAQEM/ArcLib/blob/f602714beb0b5b6a4c941fd4fb892e353fc0d3ef/common/src/main/java/com/daqem/arc/mixin/MixinLivingEntity.java#L24

In this mixin, they define a getLivingEntity function, which overrides the getLivingEntity method of NPC entities and other entities that implement this function. https://github.com/MarkusBordihn/BOs-Easy-NPC/blob/efc085b7b01149d16138a5bc2317c00f9d6f7def/Common/src/main/java/de/markusbordihn/easynpc/entity/easynpc/EasyNPC.java#L210

Since the NPC entities are not part of their library, they should avoid making such changes in the mixin. Instead, they should use their own namespace rather than a general term like getLivingEntity. Alternatively, they could remove this function entirely to improve compatibility with other mods and implementations that they do not own.

As mentioned earlier, this will likely cause issues with other mods that use getLivingEntity for their entities.

Please report this issue to ArcLib, and feel free to use this information as a reference. Thank you.

tooopt commented 1 month ago

Thank you! I have reported this issue to ArcLib

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 5 days with no activity.