Minecraft Transit Railway (Automated trains, planes, and more!)

Minecraft Transit Railway (Automated trains, planes, and more!)

1M Downloads

Crash when creating Depot / Mod Compatibility Issue with Tinkers Construct

LuKasMitK opened this issue ยท 4 comments

commented

Expected Behaviour
When creating a Boat Depot via the Boat Interface, there should be no crash.

Actual Behaviour
The game crashed as I tried to create a new Depot for Boats.

Reproduction Steps
Steps to reproduce the behaviour:

  1. Build 2 Boat Nodes
  2. Connect them with Siding
  3. Open Boat Dashboard
  4. Create new Depot
  5. Drag Area
  6. Release Mouse
  7. Crash

Environment

  • Minecraft Version: 1.18.1
  • Installed Mods:
    Mod List:
    client-1.18.1-20211210.034407-srg.jar |Minecraft |minecraft |1.18.1
    TConstruct-1.18.1-3.4.2.60.jar |Tinkers' Construct |tconstruct |3.4.2.60
    forge-1.18.1-39.1.0-universal.jar |Forge |forge |39.1.0
    Mantle-1.18.1-1.8.37.jar |Mantle |mantle |1.8.37
    architectury-3.8.51.jar |Architectury |architectury |3.8.51
    MTR-forge-1.18-3.0.0.jar |Minecraft Transit Railway |mtr |1.18-3.0.0
    MTR-LU-Addon-forge-1.18.2-3.0.0-1.0.14.jar |MTR London Underground Addon |londonunderground |1.18.2-3.0.0-1.0.14

Additional Information
Crash might be related to Tinkers Construct as the crash only occurs when TC3 is loaded.

commented

Sorry, but there must be some incompatibility between TC3 and MTR, hence the only viable fix is to remove either the MTR or TC3. However would like to ask if you were able to make trains? Thank you.

commented

Oh lol, so you know your way around Java programming, nice fix though - first time I've encountered someone fixing their own bugs. Either way, hopefully Jonathan gets a look at this.

commented

Regarding the trains: Yes, they work!

There's something else: I dug a bit deeper into the code and found out where the error occured (and presumably why): There is an event listener (the events contain an entity) TC3 is listening onto and MTR seems to push an entity onto this stream when creating a depot. The problem with this entity is that entity.getCommandSenderWorld() returns null even though forge (or minecraft) specified that this function must not return null. My guess is that either MTR is sending an invalid Entity to the stream or forge is fuddling with it.
The fix I've created is to put an extra null-check in the TC3-mod, eventhough that is not an really great solution as there might be other mods running into the problem.

commented

Can you please verify if this still occurs with 4.0.0? Feel free to reopen this if the issue is still present, thanks.