promotional bannermobile promotional banner

Monkey Patches

A collection of hacky patches to fix bugs in other mods, especially bugs that were fixed in unreleased versions of those mods.

File Details

monkeypatches-0.6.0.jar

  • R
  • May 7, 2026
  • 57.49 KB
  • 305
  • 1.21.1
  • NeoForge

File Name

monkeypatches-0.6.0.jar

Supported Versions

  • 1.21.1

Curse Maven Snippet

NeoForge

implementation "curse.maven:monkeypatches-1303058:8050682"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

Added

  • Farmers Delight tag load-order fix
    • ModTagsMixin: Repairs deprecated top-level tag references in vectorwing.farmersdelight.common.tag.ModTags that capture null due to a class-init re-entry race
    • Resolves occasional NullPointerException at random tick when downstream addons call BlockState.is(ModTags.X) on a deprecated outer reference (e.g. MUSHROOM_COLONY_GROWABLE_ON)
    • Downstream symptom report: FungiDelight #8 (https://github.com/MehdiNoui/FungiDelight/issues/8)
    • Upstream fix: FD commit 5f84f22 (slated for FD 1.3.2)
    • Only loads for Farmers Delight [1.3.1, 1.3.2) — 1.3.0 lacks the deprecated outer fields and 1.3.2+ contains the upstream fix
    • No configuration option available - patch runs during early class loading before config system initializes

Technical Details

  • @Inject at RETURN of ModTags.<clinit>; by that point the inner classes (Blocks, Items, EntityTypes) are fully initialized
  • @Mutable @Shadow declarations remove final on each of the 32 deprecated outer fields so they can be reassigned from outside <clinit>
  • Repair only reassigns fields that are currently null, leaving correctly-initialized fields untouched
  • New TagKey instances are constructed with the same farmersdelight:<path> resource location as the inner-class fields; TagKey uses value equality, so reconstructed keys are interchangeable with the originals