AstralOrdana / Spelunkery

The Spelunkery mod for Minecraft
GNU Lesser General Public License v3.0
42 stars 19 forks source link

KubeJS Breaks Grindstone Polishing #225

Open TheLoganizer42 opened 1 month ago

TheLoganizer42 commented 1 month ago

Describe the bug: If the event listener ServerEvents.recipes is in a server script, interacting with a Grindstone or Diamond Grindstone ignores polishable items in hand. If not sneaking, it just opens the GUI (although it still gives the advancement for polishing a gem), and while sneaking, it just places the item if its a block, and does nothing otherwise.

Versions: (BEFORE SUBMITTING A BUG REPORT, make sure you have the most up-to-date versions of Spelunkery, Moonlight Lib and Supplementaries) Minecraft version: 1.20.1 Spelunkery version: 0.3.5/0.3.6 Moonlight Lib version: 2.11.24 Fabric API / QSL / Forge version: Fabric 0.15.11, FabricAPI 0.92.1

Other mods: I initially found this issue while developing a private modpack, but it works with just Spelunkery, KubeJS, and their dependencies. image

Logs: Even if the game does not crash they may be useful! Please provide the following logs: From .minecraft/logs : "latest.log" as well as "debug.log" if it exists. From .minecraft : "launcher_log" as well as a file that starts with "hs_err" if it exists. Note: Double check that the logs are from the correct time. ex, don't give us a log from a month ago because you forgot to check the date.

latest.log launcher_log.txt (Logs came from testing outside the modpack I originally found the bug in.)

To Reproduce: Steps to reproduce the behavior. Format it as a numbered list of steps.

  1. Add the line ServerEvents.recipes(event =>{}) to a KubeJS server script
  2. Attempt to polish an item on a grindstone

Expected behavior: A singular held item to be polished, or a whole stack if sneaking.

Screenshots: Not applicable

Additional info: Bug also reported to KubeJS GitHub.

Also, the KubeJS error in the logs is from debug code, I had previously used this profile to figure something else out, and forgot to disable it. I did retry with the errored code disabled, and got the same result.

EDIT: Clarified a few things.

TheLoganizer42 commented 1 month ago

https://github.com/KubeJS-Mods/KubeJS/issues/838