Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
959 stars 548 forks source link

Crafting items while the Server is restarting #2711

Open variananora opened 3 years ago

variananora commented 3 years ago

:round_pushpin: Description (REQUIRED)

Item in Auto Enchanter or Auto Disenchanter will disappear after a server reboot.

https://youtu.be/CoIFcN7B7f8

:bookmark_tabs: Steps to reproduce the Issue (REQUIRED)

  1. Use Auto Disenchanter or Auto Enchanter
  2. Reboot the server
  3. Item is gone

:bulb: Expected behavior (REQUIRED)

The item inside Auto Enchanter or Auto Disenchanter should not be missing

:scroll: Server Log

https://pastebin.com/xV7gUAn2

:open_file_folder: /error-reports/ Folder

There is no error log.

:compass: Environment (REQUIRED)

TheBusyBiscuit commented 3 years ago

That's not really a bug, it's just the way the system works and it always did so. This is probably not going to be "fixed" or more like "added" within the next year or two. But I guess I will leave it open incase someone else sees it, perhaps we can make it a Hacktoberfest issue in october XD

oahawhool commented 3 years ago

Keep in mind, the actual item, if it finishes 'cooking' does remain in the machine through a reboot. It's only items that are in the process of being completed, that vanish.

Tarluin commented 3 years ago

Several years ago it used to dupe the item being enchanted/disenchanted, it was changed to this behavior back then to fix the dupe.

JinOuYongGu commented 3 years ago

If the auto enchanter doesn't take the items at the beginning of the enhancement, but when the enchant just finished, the items won't be lost. That is, when the server restart, the items remain in the container. What we lost is just "enchant progress", but not the equipments. I think it could be a safe solution.

iTwins commented 1 year ago

A possible solution could be: On shutdown -> save machine operation to blockstorage On startup -> check blockstorage for machine operation -> if found load the machine operation and continue