Spelunkery

Spelunkery

80.4k Downloads

[Forge 1.20.1] Crash during startup with Spectrum (via Sinytra Connector)

unilock opened this issue ยท 1 comments

commented

Describe the bug:
The game crashes during startup when Spelunkery is installed alongside Spectrum using Sinytra Connector.

Versions:
Minecraft version: 1.20.1
Spelunkery version: 0.3.5
Moonlight Lib version: 2.9.7
NeoForge version: 47.1.99

Other mods:

Logs:
crash-2024-02-08_17.24.33-client.txt
debug.log

To Reproduce:

  1. Install NeoForge (or Forge 47.1.3) + Sinytra Connector + Spectrum + Spelunkery + dependencies
  2. Start the game
  3. The game crashes during startup

Expected behavior:
The game starts.

Screenshots:
N/A

Additional info:
The issue seems to be caused by this mixin:

@Inject(method = "getSoundType", at = @At("TAIL"), cancellable = true)
private void getSoundGroupMixin(CallbackInfoReturnable<SoundType> cir){
if (CommonConfigs.PORTAL_DESTRUCTION_SOUND.get()) {
String blockId = BuiltInRegistries.BLOCK.getKey(this.asBlock()).getPath();
if (blockId.equals("nether_portal")) cir.setReturnValue(NETHER_PORTAL);
}
}

During Spectrum's block registration, it calls Block#getSoundType. This fires Spelunkery's mixin, which tries to access Spelunkery's config, which then fails to initialize itself due to Forge not having finalized its mod list yet.

I expect this would happen with any mod that calls Block#getSoundType during mod initialization, so I don't think this is a Connector / Spectrum-specific issue.

commented

will be fixed for 0.3.6