Creators-of-Create / Create

[Forge Mod] Building Tools and Aesthetic Technology
MIT License
2.88k stars 900 forks source link

schematic paper gui crash #4278

Open 1h-boosted opened 1 year ago

1h-boosted commented 1 year ago

Describe the Bug

When you use the schematic paper, and try to set a cordinate, as a host you would have no issues. But the players if they use the schematic paper and try to set the cordinate the GUI will open for a host aswell. Nothing happenes till you try to exit out of the GUI. The game will crash.

Reproduction Steps

  1. Use schematic paper
  2. Set cordinate as not the host
  3. Exit out of the bugged GUI on the host PC
  4. Minecraft crashed

Expected Result

Minecraft crash

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.5.0g

Minecraft Version

1.18.2

Forge Version

40.1.93

Other Mods

No response

Additional Context

No response

edgarogh commented 1 year ago

I'm not 100% sure but the item might by using DistExecutor.unsafeRunWhenOn incorrectly. DistExecutor is used to discriminate physical sides, so when you're in a LAN server, everyone is considered to be a client, including the host server.

Again, I'm not 100% sure about this, but that may be an hypothesis to consider.