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

You can take items out of Menus after Breaking a Block #4087

Closed
4 tasks done
JustAHuman-xD opened this issue Jan 11, 2024 · 0 comments · Fixed by #4088
Closed
4 tasks done

You can take items out of Menus after Breaking a Block #4087

JustAHuman-xD opened this issue Jan 11, 2024 · 0 comments · Fixed by #4088
Assignees
Labels
🐞 Bug Report A bug that needs to be fixed. ✔ Resolved This Issue has been resolved.

Comments

@JustAHuman-xD
Copy link
Contributor

JustAHuman-xD commented Jan 11, 2024

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

There has been a long standing bug and known dupe using InfinityExpansion where you have two people, one person breaks a storage container and the other takes items out of it while they do so. There is a small period of time where you can take out items after the item has been dropped, effectively duping the Items.

I suspect the cause is the one tick delay before blockstorage is cleared after a block is broken. So after its broken but before blockstorage is cleared there is a period of time to take out items. Theoretically this should be possible with any menus but its easy for IE because of the buttons to easily take out items. The laggier the server the easier it is to achieve.

When I get out of school ill attach more information but other than description and steps I can’t give much right now.

📑 Reproduction Steps

  1. Find someone to help you
  2. Place a Storage Container filled with Items
  3. Have one person break the storage container and the other open it and spam the button to take out items
  4. See if you were successful, if not goto step 2

💡 Expected Behavior

After breaking the block the menu should be “broken” too. It should not be able to be opened, interacted with, or remain open, etc.

📷 Screenshots / Videos

(When I get out of school I’ll add a video if I can)

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Spigot (Is not software dependent)

🎮 Minecraft Version

1.20.x (But is not version dependent)

⭐ Slimefun version

Dev 1123 (But it works on every build afaik)

🧭 Other plugins

No response

@JustAHuman-xD JustAHuman-xD added 🐞 Bug Report A bug that needs to be fixed. 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Jan 11, 2024
WalshyDev added a commit that referenced this issue Jan 13, 2024
    When a block is broken we don't want to allow users to still use the inventory. This allows for them to pull items out along with blocks being dropped (if the block implements that).

    This fix is in 2 parts, the main part is just preventing the inventory from being opened if the block is queued for deletion. The second smaller part is just closing the inventory for all viewers on break. We would do this during cleanup but that was a tick later, we want it done in this tick and to prevent opening before the cleaning up is ran.
@WalshyDev WalshyDev self-assigned this Jan 13, 2024
WalshyDev added a commit that referenced this issue Jan 13, 2024
    When a block is broken we don't want to allow users to still use the inventory. This allows for them to pull items out along with blocks being dropped (if the block implements that).

    This fix is in 2 parts, the main part is just preventing the inventory from being opened if the block is queued for deletion. The second smaller part is just closing the inventory for all viewers on break. We would do this during cleanup but that was a tick later, we want it done in this tick and to prevent opening before the cleaning up is ran.
@TheBusyBot TheBusyBot added the ✔ Resolved This Issue has been resolved. label Jan 13, 2024
@variananora variananora removed the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Report A bug that needs to be fixed. ✔ Resolved This Issue has been resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants