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

Shift clicking a pearl into a furnace breaks tracking #33

Open
Lazersmoke opened this issue Mar 4, 2018 · 5 comments
Open

Shift clicking a pearl into a furnace breaks tracking #33

Lazersmoke opened this issue Mar 4, 2018 · 5 comments

Comments

@Lazersmoke
Copy link
Contributor

This happens even when the furnace is already full. The pearl stays in your inventory, but /ep check will show it as being in the furnace, or in some cases, a block at the coordinates of the furnace.

@ProgrammerDan
Copy link
Contributor

makes sense; different tile entities trigger different types of event triggers. I would recommend adding some debug code to output those Enums, and match against the logic in tracking, to see what needs improving.

@Lazersmoke
Copy link
Contributor Author

Is there a way to determine ahead of time if something will actually get placed into an inventory slot during a PLACE_ InventoryClickEvent? For example, attempting to place a pearl into a furnace's fuel slot temporarily breaks tracking (fixes itself when you place it in your inventory or drop it, but will get freed if you /ep locate while it's in your cursor) because it assumes that it was successfully placed, while it actually doesn't go in the slot because it's a fuel slot :/

@ProgrammerDan
Copy link
Contributor

so far in my testing of this nature... no. You basically need increasingly complex checks to decide if something will happen, or a post-check to validate that it did happen ... none of which is really supported and much of which is vulnerable to "rapid clicks" or other stupidly degenerate outcomes due to how minecraft handles things and as a consequence how spigot wraps and exposes it.

Simplest route is just prevent placement in all but a select few containers, then fully enumerating the containers you want to support.

@Lazersmoke
Copy link
Contributor Author

I think it is sufficient to limit it to only inventories that can accept every item in every slot, so hoppers, chests, double chests, dispensers, droppers.

@ProgrammerDan
Copy link
Contributor

ProgrammerDan commented Mar 6, 2018

That should simplify the logic a good deal.

Diet-Cola pushed a commit to Diet-Cola/ExilePearl that referenced this issue May 11, 2021
Added a method to fetch the pearl that the player is supposed to link to. This will work to fix this bug for now.
Diet-Cola pushed a commit to Diet-Cola/ExilePearl that referenced this issue May 23, 2021
Diet-Cola pushed a commit to Diet-Cola/ExilePearl that referenced this issue Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants