Interface MixinRegistry<T>


public interface MixinRegistry<T>
Injects into Registry.safeCastToReference(Holder) to unwrap delegating holders (such as DeferredHolderCommon) via IHolderCommon.getDelegate(Holder) before the Holder.Reference cast.

NeoForge already patches Registry#safeCastToReference to call holder.getDelegate() via IHolderExtension. This mixin replaces that call with IHolderCommon.getDelegate(Holder) so that all loaders use the same modloader-agnostic unwrapping path.

  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    key()
     
  • Method Details

    • key

      net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> key()