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

java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<V>
net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<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 Details

    • UncheckedRegistryEntry

      public UncheckedRegistryEntry()
  • Method Details

    • checkRegistryName

      ResourceLocation checkRegistryName(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