Curios icon indicating copy to clipboard operation
Curios copied to clipboard

[Bug]: CurioEvents

Open 2929762171 opened this issue 1 year ago • 4 comments

Minecraft Version

1.19.2

What happened?

Using kubeJS. CurioDropsEvent when gamerule keepInventory=false, cancelling event will 'eat' all equipped curios. CurioUnequipEvent will fire 3 times, like this: image I need line 39~41 to make sure to skip the first time check, and set it 'allow' so it can run into the second time check. Skipping the third fire seems no problem.

How do you trigger this bug?

...

Loader

Forge

Loader Version

forge 43.3.7

Mod Version

curios-forge-1.19.2-5.1.6.3

Relevant Log Outputs

No response

2929762171 avatar Sep 13 '24 00:09 2929762171

plus, the 3rd CurioUnequipEvent will fire CurioEquipEvent, same itemStack.

2929762171 avatar Sep 13 '24 00:09 2929762171

CurioDropsEvent when gamerule keepInventory=false, cancelling event will 'eat' all equipped curios.

This is intended, as it works the same as the more global LivingDropsEvent. It prevents the drop behavior, not the fact that the items are removed (which is controlled by the keepInventory gamerule itself).

CurioUnequipEvent will fire 3 times, like this:

Could you clarify the nature of the bug you're reporting? Is it just the fact that the event is firing 3 times? Does your script, as you've written it, work as you intend or is it not working correctly due to a potential bug?

TheIllusiveC4 avatar Sep 18 '24 03:09 TheIllusiveC4

return before client check, fire many times: image image https://github.com/user-attachments/assets/000afede-5250-4dfb-83ac-a547f430ccf3 after client check, event fire 3 times: image https://github.com/user-attachments/assets/1f03f12f-1df2-41e7-aec6-2555f037b38d if I try to do something, like change player's xp, it will also change 3 times: image https://github.com/user-attachments/assets/3cda9f55-4a33-4e92-afe3-9af4258cd320

CurioDropsEvent when gamerule keepInventory=false, cancelling event will 'eat' all equipped curios.

This is intended, as it works the same as the more global LivingDropsEvent. It prevents the drop behavior, not the fact that the items are removed (which is controlled by the keepInventory gamerule itself).

CurioUnequipEvent will fire 3 times, like this:

Could you clarify the nature of the bug you're reporting? Is it just the fact that the event is firing 3 times? Does your script, as you've written it, work as you intend or is it not working correctly due to a potential bug?

2929762171 avatar Sep 18 '24 20:09 2929762171

At this situation, if I want to cost some xpLevel to unequip binding curse item from slot, I need to setResult('allow') in the first and second time, the second time is necessary.

2929762171 avatar Sep 18 '24 21:09 2929762171