Create Railways Navigator

Create Railways Navigator

2M Downloads

Setting a schedule with the Create ComputerCraft integration causes a crash and soft-lock

emilytrau opened this issue ยท 1 comments

commented

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.

Malformed NBT data:
Image

To Reproduce
Steps to reproduce the behavior:

  1. Create a setup like the screenshots below
  2. Run edit crash.lua and paste in the following script
  3. 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.

Image

Image

Image

Additional context
Add any other context about the problem here.

crash-2025-05-14_23.50.54-server.txt

commented

The problem is that the UUID of the train category or train line is not written as an int[], but as a list. I will work on a solution in a future update.