Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: CurioEvents #444

Open
2929762171 opened this issue Sep 13, 2024 · 4 comments
Open

[Bug]: CurioEvents #444

2929762171 opened this issue Sep 13, 2024 · 4 comments
Assignees
Labels
status: pending This issue or pull request is pending further information or consideration type: bug Something isn't working

Comments

@2929762171
Copy link

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 2929762171 added status: triage This issue or pull request is awaiting review type: bug Something isn't working labels Sep 13, 2024
@2929762171
Copy link
Author

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

@TheIllusiveC4 TheIllusiveC4 added status: pending This issue or pull request is pending further information or consideration and removed status: triage This issue or pull request is awaiting review labels Sep 18, 2024
@TheIllusiveC4
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending This issue or pull request is pending further information or consideration type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants