Skip to content

[BUG] Patch field type modification causing an incompatibility with code expecting the java.util.Set type #189

Description

@iocmet

Describe the bug
In the ChunkProviderServer.java.patch patch, Crucible changes the type of the chunksToUnload field from java.util.Set to org.bukkit.craftbukkit.v1_7_R4.util.LongHashSet; this behavior invalidates assumptions made by any code relying on the field's type to be java.util.Set.

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest Crucible staging build (staging-4165e2a-dev-203 at the time of writing this issue).
  2. Insert any code that expects the field ChunkProviderServer.chunksToUnload to be of the java.util.Set type and errors on failure to do so into the runtime environment (for example, install the Lumi mod).
  3. Observe an error / an exception of the org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException type in case of the Lumi mod.

Expected behavior
There exists a field in the net.minecraft.world.gen.ChunkProviderServer class named chunksToUnload (field_73248_b) with the type java.util.Set, and the operations defined by the java.util.Set interface performed on it have the same effect as in a plain Forge server environment.

Logs
crash-report.txt

Screenshots
None.

Additional context
I had initially encountered this issue with the Lumi mod, which is provided as an example above, but presumably it can occur with any code expecting the field to be of the java.util.Set type.

Environment (please complete the following information):

  • Crucible Version: staging-4165e2a-dev-203
  • Plugins: None.
  • Mods: Tested with UniMixins 0.3.0, ChunkAPI 0.8.2, FalsePatternLib 1.10.7, Lumi 1.2.0
  • Java Version: openjdk version "21.0.7" 2025-04-15 LTS
  • OS: Windows 11

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