Package net.minecraftforge.registries
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) ResourceLocation
checkRegistryName(String name)
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.Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Constructor Details
-
UncheckedRegistryEntry
public UncheckedRegistryEntry()
-
-
Method Details
-
checkRegistryName
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 classForgeRegistryEntry<V extends IForgeRegistryEntry<V>>
- Parameters:
name
- The registry name- Returns:
- A verified "correct" registry name
-