FancyMcPlugins / FancyNpcs

FancyNpcs is a simple, lightweight and fast npc plugin using packets
https://modrinth.com/plugin/fancynpcs
MIT License
98 stars 23 forks source link

Fix right click not working on non player npcs #91

Closed alexcastro1919 closed 4 months ago

alexcastro1919 commented 4 months ago

As the title says, now non player npcs support right click.

OliverSchlueter commented 4 months ago

Could you describe under which conditions right clicking non player npcs is not working? I've tried a few types and it worked for me.

alexcastro1919 commented 4 months ago

I tried with CHEST_BOAT and WANDERING_TRADER and none worked

alexcastro1919 commented 4 months ago

This was the condition causing the issue if (!event.isAttack() && (event.getHand() == EquipmentSlot.HAND || event.getClickedRelativePosition() != null)) I suppose it was because getClickedRelativePosition returned not null (and obviously right click is not an attack).

OliverSchlueter commented 4 months ago

Thank you!

OliverSchlueter commented 3 months ago

Not working on Folia image

I reverted the commit for now, will need to investigate the actual problem