Class ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>

  • All Implemented Interfaces:
    IForgeRegistryEntry<V>
    Direct Known Subclasses:
    Biome
    Enclosing class:
    ForgeRegistryEntry<V extends IForgeRegistryEntry<V>>

    public abstract static class ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
    extends ForgeRegistryEntry<V>
    This class exists for registry entries which are dynamic (e.g. loaded via data packs), and also exist in a forge registry prior to that. Due to this, the registry name will be set via the codec not during initial registration, and as a result, we want to not warn about possible overrides as the registry name will be set outside of mod context.
    • Constructor Detail

      • UncheckedRegistryEntry

        public UncheckedRegistryEntry()
    • Method Detail

      • checkRegistryName

        ResourceLocation checkRegistryName​(java.lang.String name)
        Description copied from class: ForgeRegistryEntry
        This will assert that the registry name is valid and warn about potential registry overrides It is important as it detects cases where modders unintentionally register objects with the "minecraft" namespace, leading to dangerous errors later.
        Overrides:
        checkRegistryName in class ForgeRegistryEntry<V extends IForgeRegistryEntry<V>>
        Parameters:
        name - The registry name
        Returns:
        A verified "correct" registry name