TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Self tests apply to other mods

natrow opened this issue ยท 1 comments

commented

There's a crash whenever another mod has missing Translation keys due to the self check in https://github.com/TerraFirmaCraft/TerraFirmaCraft/blob/1.20.x/src/main/java/net/dries007/tfc/util/SelfTests.java#L393

Steps to reproduce:

  • Install TFC/patchouli/forge for 1.20.1
  • Install mod(s) with missing translation keys (e.g. domum ornamentum)
  • Enable debug assertions (jvm option -ea)

Perhaps this is intentional, but it seems like the self test should only look at translation keys for things added by TFC itself.

Example crash report:
https://pastebin.com/D5a9eTsY

Use case/Justification:
Compatibility addons that are developed in a modding environment (forge mdk) enable debug assertions by default. If a dependency mod is missing translation keys (many of them are) the game will crash in/after the FREEZE_DATA loading stage.

commented

Honestly, as this is only meant to be enabled while in a TFC dev env, a better check for that would be ideal here. I think moving from Helpers.ASSERTIONS_ENABLED to Helpers.TEST_ENVIRONMENT would be sufficient but still run them