Skip to content

[Bug]: RFB causes Enum Incompatibility (java.lang.ExceptionInInitializerError) with lwjgl3ify #185

@brokestar233

Description

@brokestar233

Describe the bug
A java.lang.RuntimeException occurs during the mod construction phase because ItemArmor$ArmorMaterial is not made extensible, even when it is correctly defined in the extensibleEnums configuration.

This appears to be a regression/conflict caused by the introduction of RetroFuturaBootstrap (RFB). It seems RFB or early Mixins trigger the loading of the ItemArmor class before lwjgl3ify has the opportunity to apply its "Dynamicized" transformation, causing the class to be finalized by the JVM prematurely.

To Reproduce
Steps to reproduce the behavior:

  1. Use Crucible version 1.7.10-staging-684d4d6a (or any build featuring RFB).
  2. Install a mod that adds armor materials using EnumHelper.addArmorMaterial (e.g., Glacia mod).
  3. Ensure net.minecraft.item.ItemArmor$ArmorMaterial is added to the extensibleEnums list in Crucible.yml.
  4. Start the server.
  5. See the error: java.lang.RuntimeException: Enum net.minecraft.item.ItemArmor$ArmorMaterial was not made extensible.

Expected behavior
The server should boot successfully. lwjgl3ify should transform the target Enum before any other mod or Mixin triggers the loading of the ItemArmor class.

Logs

Screenshots
N/A

Additional context

  • Root Cause Analysis: I have confirmed that this issue only occurs when RFB is active. When using a version of Crucible without RFB, the server starts normally and the log correctly states: [lwjgl3ify]: Dynamicized enum abd=net.minecraft.item.ItemArmor$ArmorMaterial.
  • In the failing scenario, the "Dynamicized enum" log entry for ArmorMaterial never appears before the crash, suggesting a class-loading circular dependency or premature class-loading.

Environment (please complete the following information):

  • Crucible Version: 1.7.10-staging-684d4d6 | dev-200
  • Plugins: None (Server crashes during FML load)
  • Mods: 131 mods (TFRU Modpack)
  • Java Version: OpenJDK 64-Bit Server VM, version 1.8.0_462 (Alibaba Dragonwell)
  • OS: Windows 11 (amd64) version 10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions