Package net.minecraftforge.registries
Class RegistryManager
- java.lang.Object
-
- net.minecraftforge.registries.RegistryManager
-
public class RegistryManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static RegistryManager
ACTIVE
static RegistryManager
FROZEN
private java.util.Map<ResourceLocation,ResourceLocation>
legacyNames
private static org.apache.logging.log4j.Logger
LOGGER
private java.lang.String
name
private java.util.Set<ResourceLocation>
persisted
(package private) com.google.common.collect.BiMap<ResourceLocation,ForgeRegistry<? extends IForgeRegistryEntry<?>>>
registries
private com.google.common.collect.BiMap<java.lang.Class<? extends IForgeRegistryEntry<?>>,ResourceLocation>
superTypes
private java.util.Set<ResourceLocation>
synced
static RegistryManager
VANILLA
-
Constructor Summary
Constructors Constructor Description RegistryManager(java.lang.String name)
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ACTIVE
public static final RegistryManager ACTIVE
-
VANILLA
public static final RegistryManager VANILLA
-
FROZEN
public static final RegistryManager FROZEN
-
registries
com.google.common.collect.BiMap<ResourceLocation,ForgeRegistry<? extends IForgeRegistryEntry<?>>> registries
-
superTypes
private com.google.common.collect.BiMap<java.lang.Class<? extends IForgeRegistryEntry<?>>,ResourceLocation> superTypes
-
persisted
private java.util.Set<ResourceLocation> persisted
-
synced
private java.util.Set<ResourceLocation> synced
-
legacyNames
private java.util.Map<ResourceLocation,ResourceLocation> legacyNames
-
name
private final java.lang.String name
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getSuperType
public <V extends IForgeRegistryEntry<V>> java.lang.Class<V> getSuperType(ResourceLocation key)
-
getRegistry
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceLocation key)
-
getRegistry
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(RegistryKey<? extends Registry<V>> key)
-
getRegistry
public <V extends IForgeRegistryEntry<V>> IForgeRegistry<V> getRegistry(java.lang.Class<? super V> cls)
-
getName
public <V extends IForgeRegistryEntry<V>> ResourceLocation getName(IForgeRegistry<V> reg)
-
updateLegacyName
public <V extends IForgeRegistryEntry<V>> ResourceLocation updateLegacyName(ResourceLocation legacyName)
-
getRegistry
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceLocation key, RegistryManager other)
-
createRegistry
<V extends IForgeRegistryEntry<V>> ForgeRegistry<V> createRegistry(ResourceLocation name, RegistryBuilder<V> builder)
-
addLegacyName
private void addLegacyName(ResourceLocation legacyName, ResourceLocation name)
-
findSuperTypes
private void findSuperTypes(java.lang.Class<?> type, java.util.Set<java.lang.Class<?>> types)
-
takeSnapshot
public java.util.Map<ResourceLocation,ForgeRegistry.Snapshot> takeSnapshot(boolean savingToDisc)
-
clean
public void clean()
-
generateRegistryPackets
public static java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,FMLHandshakeMessages.S2CRegistry>> generateRegistryPackets(boolean isLocal)
-
getRegistryNamesForSyncToClient
public static java.util.List<ResourceLocation> getRegistryNamesForSyncToClient()
-
-