
Setting a schedule with the Create ComputerCraft integration causes a crash and soft-lock
emilytrau opened this issue ยท 1 comments
Version:
- Minecraft Version: [e.g. 1.18.2] 1.20.1
- Forge Version [e.g. 40.2.0] Fabric 0.16.4
- Mod Version [e.g. 0.6.0-beta-1.18.2] 1.20.1-beta-0.8.0
Describe the bug
A clear and concise description of what the bug is.
Trying to automate setting a schedule with Create's built in ComputerCraft/CC:Tweaked integration including CRN sections causes a crash. When trying to write back a schedule the, integration format the train_category
and train_line
NBT data in a way that is incompatible with CRN's expected types. A crash will occur immediately and every time the world is loaded requiring a manual NBT edit to un-softlock the save.
To Reproduce
Steps to reproduce the behavior:
- Create a setup like the screenshots below
- Run
edit crash.lua
and paste in the following script - Executing the script causes a crash
local pretty = require "cc.pretty"
local station = peripheral.wrap("right")
-- Should print a train schedule similar to below
local schedule = station.getSchedule()
pretty.pretty_print(schedule)
-- {
-- cyclic = true,
-- entries = {
-- {
-- instruction = {
-- data = {
-- usable = false,
-- train_category = {
-- -2006329496,
-- 1759200103,
-- -1670741727,
-- -706370800,
-- },
-- train_line = {
-- -1838223794,
-- 1693663684,
-- -1344732757,
-- -1200285980,
-- },
-- include_previous_station = false,
-- },
-- id = "createrailwaysnavigator:travel_section",
-- },
-- },
-- }
-- }
-- Attempting to write back the schedule results in a crash
station.setSchedule(schedule)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.