MarkusBordihn / BOs-Easy-NPC

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

[Bug] Timless and classic zero + easy npc #282

Closed Zihan-afk-star closed 1 month ago

Zihan-afk-star commented 1 month ago

Note: Please make sure to fill out the following template to the best of your ability. This will help us to identify and fix the issue faster.

Minecraft and Mod version 🐞 Version: 1.20.1 Forge 5.5.0 or 5.4.1

Describe the bug 🐞 When I give the TACZ weapon, the weapon model disappears and does not fire.

To Reproduce ⚙️ set a npc to attack you with gun attack and fix model and replace non-existent item on gun

Expected behavior ✔️ The model of weapons and ammunition in the hands and on the back is changing. And it changes to a non-existent item.

Screenshots 📸 If applicable, add screenshots to help explain your problem.

Debugging 🛠️ Before reporting an issue, please enable the debug mode over /easy_npc debug true to get more detailed information about the issue in the logs. Additionally, check if there is anything relevant in the crash-reports, debug.log, and latest.log file.

Is the issue happening in combination with other mods? (If yes, please provide a full list) 🧩 2024-08-10_14 50 11 1 2 3

Timeless and classic Zero Les Raisins addon pack Additional context 📝 Add any other context about the problem here.

MarkusBordihn commented 1 month ago

Thank you for the feedback!

After a quick review, it appears that this issue affects all entities, including standard vanilla entities like Zombies.

image

Upon inspecting the code, it seems that a LocalPlayer instance is required for their model and animation system. Because of this, the mod currently doesn’t function with non-player entities.

To resolve this, the Timeless and Classics Zero mod would need to extend support to regular entities, not just LocalPlayer.

Zihan-afk-star commented 1 month ago

I suppose an extend is also needed for them to start shooting?

MarkusBordihn commented 1 month ago

I suppose an extend is also needed for them to start shooting?

Yes, if you want them to shoot with their original ammunition. The weapons are highly customized, which isn’t inherently a bad thing, but in this case, they are designed exclusively for players and not for non-player entities.

Zihan-afk-star commented 1 month ago

thank you for help

0Thunder1 commented 1 month ago

I suppose an extend is also needed for them to start shooting?

Yes, if you want them to shoot with their original ammunition. The weapons are highly customized, which isn’t inherently a bad thing, but in this case, they are designed exclusively for players and not for non-player entities.

Hey! I have the same problem. I understand this issue because of TACZ, but.... however, I am still confused by the very fact of the presence of the "gun attack" function. So, what kind of mods do support easyNPCs "gun attack" function? Do you know some?:)

MarkusBordihn commented 1 month ago

Great news! With version 5.5.6, you can now use TACZ weapons. However, please note that they currently use arrows as ammunition instead of their own specific ammo. I plan to add custom bullets in a future update that will better match these weapons.

The "gun attack" feature supports weapons listed in the following JSON file: BOs-Easy-NPC gun.json.

You can add and try out any custom weapons with this feature, but keep in mind that they will still be restricted to using arrows as projectiles for now.