Train name keeps getting added "Split off from:" when decoupling leading to a fatal crash when the string overflows
d-513 opened this issue · 3 comments
Describe the Bug
Train name keeps getting added "Split off from:" when decoupling leading to a fatal crash when the string overflows the max character limit
This has also the effect of not being able to read the train coupling block's tooltip as the train's name doesn't fit on the screen.
Reproduction Steps
- Create a train
- Make any kind of automated system that will decouple cars using the coupler blocks (e.g sending a redstone link signal via train schedule to a redstone link next to a decoupling block). Get a chunk loader so the signal works even when no one is playing.
- Every time it's decoupled and recoupled, a "Split off from: " is added to the front of the train's name.
- Keep it running for a couple of days, server will crash due to overflow
Expected Result
"Split off from:" being removed when recoupling, or using a randomly generated string to identify the split off's
A config option to disable the renaming would be fine as well.
Screenshots and Videos
Crash Report or Log
Operating System
Debian 12
Mod Version
1.5.3
Create Mod Version
0.5.1f
Minecraft Version
1.20.1
ModLoader and Version
Forge
Other Mods
Additional Context
It attempts that an attempt was made to remedy this issue, however it proved insufficient
train.doubleEnded = train.carriages.stream().anyMatch(carriage -> carriage.anyAvailableEntity().getContraption() i>
if(!train.name.getString().contains("Split off from: ")){
newTrain.name = Components.literal("Split off from: "+train.name.getString());
}
else newTrain.name = Components.literal(train.name.getString());
This condition should prevent this from happening, but it does not. There must be an issue here or somewhere else in the code.
FIX FOR WORLD BROKEN BY THIS
Warning: probably will not give you back the shedule, have a backup
- Download world/data/create_tracks.dat
- Open nbt editor e.g https://irath96.github.io/webNBT/
- Edit the train name to something that doesn't overflow
This should be fixed by 48d26db already
This should be fixed by 48d26db already
Yes, I saw the code, but the issue hasn’t been fixed. I have steam and rails 1.5.3
edit: unless that hasn’t been in the release yet
This should be fixed by 48d26db already
Yes, I saw the code, but the issue hasn’t been fixed. I have steam and rails 1.5.3
edit: unless that hasn’t been in the release yet
Correct, it's scheduled to be released in 1.6.0