public class RegistryManager
extends java.lang.Object
Modifier and Type | Field and 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 and Description |
---|
RegistryManager(java.lang.String name) |
private static final org.apache.logging.log4j.Logger LOGGER
public static final RegistryManager ACTIVE
public static final RegistryManager VANILLA
public static final RegistryManager FROZEN
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> persisted
private java.util.Set<ResourceLocation> synced
private java.util.Map<ResourceLocation,ResourceLocation> legacyNames
private final java.lang.String name
public java.lang.String getName()
public <V extends IForgeRegistryEntry<V>> java.lang.Class<V> getSuperType(ResourceLocation key)
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceLocation key)
public <V extends IForgeRegistryEntry<V>> IForgeRegistry<V> getRegistry(java.lang.Class<? super V> cls)
public <V extends IForgeRegistryEntry<V>> ResourceLocation getName(IForgeRegistry<V> reg)
public <V extends IForgeRegistryEntry<V>> ResourceLocation updateLegacyName(ResourceLocation legacyName)
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(ResourceLocation key, RegistryManager other)
<V extends IForgeRegistryEntry<V>> ForgeRegistry<V> createRegistry(ResourceLocation name, RegistryBuilder<V> builder)
private void addLegacyName(ResourceLocation legacyName, ResourceLocation name)
private void findSuperTypes(java.lang.Class<?> type, java.util.Set<java.lang.Class<?>> types)
public java.util.Map<ResourceLocation,ForgeRegistry.Snapshot> takeSnapshot(boolean savingToDisc)
public void clean()
public static java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.String,FMLHandshakeMessages.S2CRegistry>> generateRegistryPackets(boolean isLocal)
public static java.util.List<ResourceLocation> getRegistryNamesForSyncToClient()