Fabricators-of-Create / Create

[Fabric Mod] Building Tools and Aesthetic Technology
MIT License
896 stars 199 forks source link

setting a train schedule to an empty lua table (computercraft) crashes the game and bricks the world #1605

Closed Waoweens closed 2 months ago

Waoweens commented 2 months ago

Context

Setup: 2024-09-17_16 18 42

Program:

peripheral.wrap("left").setSchedule({})

after running the program, the game will freeze and soon crash, and attempting to enter that world again will cause it to crash immediately.

if this is not the right way to clear the schedule, what is?

Crash Report

https://mclo.gs/sZYSsI6

VoidLeech commented 2 months ago

Upstream issue, getting the world into this state will be fixed in 0.5.1g. The world itself is saveable /w NBTExplorer, find the train with an empty schedule in your world's data/create_tracks.dat and remove it/the schedule. https://github.com/Creators-of-Create/Create/issues/6838

Waoweens commented 2 months ago

what's the right way to clear the schedule? i don't see a function to do that

VoidLeech commented 2 months ago

Reading the docs I don't think there is one. (Nor does the fix in 0.5.1g add one) If it's just about getting the train to not continue, you might be able to setschedule with an invalid destination. (But I'm not sure on that)

IThundxr commented 2 months ago

Fixed in dev