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

Inventory#dropAll overwrite may break mods' expectations #1

Closed
Pyrofab opened this issue Jan 30, 2020 · 4 comments
Closed

Inventory#dropAll overwrite may break mods' expectations #1

Pyrofab opened this issue Jan 30, 2020 · 4 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@Pyrofab
Copy link

Pyrofab commented Jan 30, 2020

The dropAll Overwrite will affect the behaviour of any mod that calls the method directly. It would probably be better to leave the original method intact and redirect the call in PlayerEntity#dropInventory instead.

@Pyrofab Pyrofab changed the title Inventory#dropAll overwrite may break mods' expectations Inventory#dropAll overwrite may break mods' expectations Jan 30, 2020
@CerulanLumina
Copy link
Owner

Thanks for this~

@CerulanLumina CerulanLumina self-assigned this Jan 30, 2020
@CerulanLumina CerulanLumina added the bug Something isn't working label Jan 30, 2020
@CerulanLumina CerulanLumina added this to the 1.0.0 milestone Jan 30, 2020
@Pyrofab Pyrofab mentioned this issue Jan 30, 2020
@CerulanLumina
Copy link
Owner

Could you check to see if I used redirect appropriately (in a way that won't break other mods' expectations)? Thanks~~

@CerulanLumina CerulanLumina added the help wanted Extra attention is needed label Feb 1, 2020
@Pyrofab
Copy link
Author

Pyrofab commented Feb 2, 2020

Looks fine ! But I would recommend using At#target instead of At#ordinal to select the redirected method call. It would be less likely to break, and would make the code clearer.

@CerulanLumina
Copy link
Owner

Moved to using target, re-open if there's anything else I should change here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants