
Train Signals fail to remove themselves from track graph when broken
techno-sam opened this issue ยท 1 comments
Describe the Bug
When a Train Signal is placed on a track, and subsequently broken, the track graph remains split into separate signal blocks, as indicated by the multiple colors on a track while holding a Train Signal.
Furthermore, attempting to place a different track targeting block, like the Train Station, on the same track block will display the error "Targeted track is occupied."
Additionally, on saving and reloading the world, this persists, indicating that it is not a client/network sync issue.
Reproduction Steps
- Place down a track, several blocks long.
- Hold a train signal, notice that a single color line appears through the track, indicating a single signal block.
- Place the track signal on the track, and notice that there are now two lines, of different colors, indicating two signal blocks
- Break the track signal, and hold a track signal. Notice that there are still two lines of different colors, indicating two signal blocks. You can confirm this by executing
/create trains
and noting that the graph will still be listed as having '1 Signals.' - Break a block of the track, and replace it. Hold a train signal, and note that there is now only one colored line, indicating that it has been restored to consisting of only one signal block.
Expected Result
I would expect that the signal edge point would be removed from the track graph when the Train Signal block is broken.
Screenshots and Videos
After breaking and replacing a track block:
Output from /create trains
(note that the relevant network is id 68a73
):
Crash Report or Log
N/A
Operating System
Ubuntu 22.04
Mod Version
0.5.0g
Minecraft Version
1.19.2
Forge Version
43.1.52
Other Mods
None
Additional Context
This is caused because com.simibubi.create.content.logistics.trains.management.edgePoint.signal.SignalBlock
does not call ITE.onRemove
in its onRemove
method (in fact, it doesn't overwride the onRemove
method at all).
The issue can be fixed by adding the following code to SignalBlock
:
@Override
public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) {
ITE.onRemove(pState, pLevel, pPos, pNewState);
}