Package net.minecraftforge.registries
Class GameData
java.lang.Object
net.minecraftforge.registries.GameData
INTERNAL ONLY
 MODDERS SHOULD HAVE NO REASON TO USE THIS CLASS
 
Use the public IForgeRegistry and ForgeRegistries APIs to get the data
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static classprivate static classprivate static classprivate static classprivate static class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate static final booleanprivate static booleanprivate static final BiConsumer<ResourceLocation,ForgeRegistry<?>> private static final org.apache.logging.log4j.Loggerprivate static final intprivate static final org.apache.logging.log4j.Marker
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ResourceLocationcheckPrefix(String name, boolean warnOverrides) Check a name for a domain prefix, and if not present infer it from the current active mod container.private static voidfireRemapEvent(Map<ResourceLocation, Map<ResourceLocation, IdMappingEvent.IdRemapping>> remaps, boolean isFreezing) static voidstatic IdMapper<BlockState>static Map<BlockState,PoiType> (package private) static RegistryBuilder<EntityDataSerializer<?>>(package private) static RegistryBuilder<FluidType>(package private) static RegistryBuilder<com.mojang.serialization.Codec<? extends IGlobalLootModifier>>(package private) static RegistryBuilder<ItemDisplayContext>static <T> MappedRegistry<T>getWrapper(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) static <T> MappedRegistry<T>getWrapper(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, String defKey) static voidinit()static com.google.common.collect.Multimap<ResourceLocation,ResourceLocation> injectSnapshot(Map<ResourceLocation, ForgeRegistry.Snapshot> snapshot, boolean injectFrozenData, boolean isLocalWorld) private static <T> voidloadFrozenDataToStagingRegistry(RegistryManager STAGING, ResourceLocation name, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps) private static <T> voidloadPersistentDataToStagingRegistry(RegistryManager pool, RegistryManager to, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps, it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceLocation> missing, ResourceLocation name, ForgeRegistry.Snapshot snap) private static <T> voidloadRegistry(ResourceLocation registryName, RegistryManager from, RegistryManager to, boolean freeze) private static <T> RegistryBuilder<T>makeRegistry(ResourceKey<? extends Registry<T>> key) private static <T> RegistryBuilder<T>makeRegistry(ResourceKey<? extends Registry<T>> key, int min, int max) private static <T> RegistryBuilder<T>makeRegistry(ResourceKey<? extends Registry<T>> key, String _default) (package private) static <T> RegistryBuilder<T>static voidprivate static <T> voidprocessMissing(ResourceLocation name, RegistryManager STAGING, MissingMappingsEvent e, it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceLocation> missing, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps, Collection<ResourceLocation> defaulted, Collection<ResourceLocation> failed, boolean injectNetworkDummies) static voidrevert(RegistryManager state, ResourceLocation registry, boolean lock) static voidrevertTo(RegistryManager target, boolean fireEvents) static voidstatic voidstatic void
- 
Field Details- 
LOGGERprivate static final org.apache.logging.log4j.Logger LOGGER
- 
REGISTRIESprivate static final org.apache.logging.log4j.Marker REGISTRIES
- 
MAX_VARINTprivate static final int MAX_VARINT- See Also:
 
- 
BLOCK_TO_ITEM
- 
BLOCKSTATE_TO_ID
- 
BLOCKSTATE_TO_POINT_OF_INTEREST_TYPE
- 
hasInitprivate static boolean hasInit
- 
DISABLE_VANILLA_REGISTRIESprivate static final boolean DISABLE_VANILLA_REGISTRIES
- 
LOCK_VANILLA
 
- 
- 
Constructor Details- 
GameDatapublic GameData()
 
- 
- 
Method Details- 
initpublic static void init()
- 
getDataSerializersRegistryBuilder
- 
getGLMSerializersRegistryBuilderstatic RegistryBuilder<com.mojang.serialization.Codec<? extends IGlobalLootModifier>> getGLMSerializersRegistryBuilder()
- 
getFluidTypeRegistryBuilder
- 
makeUnsavedAndUnsynced
- 
getItemDisplayContextRegistryBuilder
- 
makeRegistry
- 
makeRegistryprivate static <T> RegistryBuilder<T> makeRegistry(ResourceKey<? extends Registry<T>> key, int min, int max) 
- 
makeRegistryprivate static <T> RegistryBuilder<T> makeRegistry(ResourceKey<? extends Registry<T>> key, String _default) 
- 
getWrapperpublic static <T> MappedRegistry<T> getWrapper(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle) 
- 
getWrapperpublic static <T> MappedRegistry<T> getWrapper(ResourceKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, String defKey) 
- 
getBlockItemMap
- 
getBlockStateIDMap
- 
getBlockStatePointOfInterestTypeMap
- 
vanillaSnapshotpublic static void vanillaSnapshot()
- 
unfreezeDatapublic static void unfreezeData()
- 
freezeDatapublic static void freezeData()
- 
revertToFrozenpublic static void revertToFrozen()
- 
revertTo
- 
revert
- 
postRegisterEventspublic static void postRegisterEvents()
- 
loadRegistryprivate static <T> void loadRegistry(ResourceLocation registryName, RegistryManager from, RegistryManager to, boolean freeze) 
- 
injectSnapshotpublic static com.google.common.collect.Multimap<ResourceLocation,ResourceLocation> injectSnapshot(Map<ResourceLocation, ForgeRegistry.Snapshot> snapshot, boolean injectFrozenData, boolean isLocalWorld) 
- 
fireRemapEventprivate static void fireRemapEvent(Map<ResourceLocation, Map<ResourceLocation, IdMappingEvent.IdRemapping>> remaps, boolean isFreezing) 
- 
loadPersistentDataToStagingRegistryprivate static <T> void loadPersistentDataToStagingRegistry(RegistryManager pool, RegistryManager to, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps, it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceLocation> missing, ResourceLocation name, ForgeRegistry.Snapshot snap) 
- 
processMissingprivate static <T> void processMissing(ResourceLocation name, RegistryManager STAGING, MissingMappingsEvent e, it.unimi.dsi.fastutil.objects.Object2IntMap<ResourceLocation> missing, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps, Collection<ResourceLocation> defaulted, Collection<ResourceLocation> failed, boolean injectNetworkDummies) 
- 
loadFrozenDataToStagingRegistryprivate static <T> void loadFrozenDataToStagingRegistry(RegistryManager STAGING, ResourceLocation name, Map<ResourceLocation, IdMappingEvent.IdRemapping> remaps) 
- 
checkPrefixCheck a name for a domain prefix, and if not present infer it from the current active mod container.- Parameters:
- name- The name or resource location
- warnOverrides- If true, logs a warning if domain differs from that of the currently currently active mod container
- Returns:
- The ResourceLocationwith given or inferred domain
 
 
-