public class GameData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
GameData.BlockCallbacks |
(package private) static class |
GameData.ClearableObjectIntIdentityMap<I> |
private static class |
GameData.FeatureCallbacks |
private static class |
GameData.ItemCallbacks |
private static class |
GameData.SerializerCallbacks |
Constructor and Description |
---|
GameData() |
Modifier and Type | Method and Description |
---|---|
static ResourceLocation |
checkPrefix(java.lang.String name,
boolean warnOverrides)
Check a name for a domain prefix, and if not present infer it from the
current active mod container.
|
static void |
fireCreateRegistryEvents() |
static void |
fireCreateRegistryEvents(LifecycleEventProvider lifecycleEventProvider,
java.util.function.Consumer<LifecycleEventProvider> eventDispatcher) |
static void |
fireRegistryEvents(java.util.function.Predicate<ResourceLocation> filter,
LifecycleEventProvider lifecycleEventProvider,
java.util.function.Consumer<LifecycleEventProvider> eventDispatcher) |
private static void |
fireRemapEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps,
boolean isFreezing) |
private static void |
forceRegistryName(IForgeRegistryEntry<?> entry,
ResourceLocation name) |
static void |
freezeData() |
static java.util.Map<Block,Item> |
getBlockItemMap() |
static ObjectIntIdentityMap<BlockState> |
getBlockStateIDMap() |
static java.util.Map<IDataSerializer<?>,DataSerializerEntry> |
getSerializerMap() |
static Registry<Structure<?>> |
getStructureFeatures() |
static com.google.common.collect.BiMap<java.lang.String,Structure<?>> |
getStructureMap() |
static <V extends IForgeRegistryEntry<V>> |
getWrapper(java.lang.Class<? super V> cls) |
static <V extends IForgeRegistryEntry<V>> |
getWrapperDefaulted(java.lang.Class<? super V> cls) |
static void |
init() |
static com.google.common.collect.Multimap<ResourceLocation,ResourceLocation> |
injectSnapshot(java.util.Map<ResourceLocation,ForgeRegistry.Snapshot> snapshot,
boolean injectFrozenData,
boolean isLocalWorld) |
private static <T extends IForgeRegistryEntry<T>> |
loadFrozenDataToStagingRegistry(RegistryManager STAGING,
ResourceLocation name,
java.util.Map<ResourceLocation,java.lang.Integer[]> remaps,
java.lang.Class<T> clazz) |
private static <T extends IForgeRegistryEntry<T>> |
loadPersistentDataToStagingRegistry(RegistryManager pool,
RegistryManager to,
java.util.Map<ResourceLocation,java.lang.Integer[]> remaps,
java.util.Map<ResourceLocation,java.lang.Integer> missing,
ResourceLocation name,
ForgeRegistry.Snapshot snap,
java.lang.Class<T> regType) |
private static <T extends IForgeRegistryEntry<T>> |
loadRegistry(ResourceLocation registryName,
RegistryManager from,
RegistryManager to,
java.lang.Class<T> regType,
boolean freeze) |
private static <T extends IForgeRegistryEntry<T>> |
makeRegistry(ResourceLocation name,
java.lang.Class<T> type) |
private static <T extends IForgeRegistryEntry<T>> |
makeRegistry(ResourceLocation name,
java.lang.Class<T> type,
int min,
int max) |
private static <T extends IForgeRegistryEntry<T>> |
makeRegistry(ResourceLocation name,
java.lang.Class<T> type,
ResourceLocation _default) |
private static <T extends IForgeRegistryEntry<T>> |
processMissing(java.lang.Class<T> clazz,
ResourceLocation name,
RegistryManager STAGING,
RegistryEvent.MissingMappings<?> e,
java.util.Map<ResourceLocation,java.lang.Integer> missing,
java.util.Map<ResourceLocation,java.lang.Integer[]> remaps,
java.util.Collection<ResourceLocation> defaulted,
java.util.Collection<ResourceLocation> failed,
boolean injectNetworkDummies) |
static <K extends IForgeRegistryEntry<K>> |
register_impl(K value) |
static void |
revert(RegistryManager state,
ResourceLocation registry,
boolean lock) |
static void |
revertToFrozen() |
static void |
vanillaSnapshot() |
private static final org.apache.logging.log4j.Logger LOGGER
public static final ResourceLocation BLOCKS
public static final ResourceLocation FLUIDS
public static final ResourceLocation ITEMS
public static final ResourceLocation POTIONS
public static final ResourceLocation BIOMES
public static final ResourceLocation SOUNDEVENTS
public static final ResourceLocation POTIONTYPES
public static final ResourceLocation ENCHANTMENTS
public static final ResourceLocation ENTITIES
public static final ResourceLocation TILEENTITIES
public static final ResourceLocation PARTICLE_TYPES
public static final ResourceLocation CONTAINERS
public static final ResourceLocation PAINTING_TYPES
public static final ResourceLocation RECIPE_SERIALIZERS
public static final ResourceLocation STAT_TYPES
public static final ResourceLocation PROFESSIONS
public static final ResourceLocation POI_TYPES
public static final ResourceLocation MEMORY_MODULE_TYPES
public static final ResourceLocation SENSOR_TYPES
public static final ResourceLocation SCHEDULES
public static final ResourceLocation ACTIVITIES
public static final ResourceLocation WORLD_CARVERS
public static final ResourceLocation SURFACE_BUILDERS
public static final ResourceLocation FEATURES
public static final ResourceLocation DECORATORS
public static final ResourceLocation BIOME_PROVIDER_TYPES
public static final ResourceLocation CHUNK_GENERATOR_TYPES
public static final ResourceLocation CHUNK_STATUS
public static final ResourceLocation BLOCK_STATE_PROVIDER_TYPES
public static final ResourceLocation BLOCK_PLACER_TYPES
public static final ResourceLocation FOLIAGE_PLACER_TYPES
public static final ResourceLocation TREE_DECORATOR_TYPES
public static final ResourceLocation MODDIMENSIONS
public static final ResourceLocation SERIALIZERS
public static final ResourceLocation LOOT_MODIFIER_SERIALIZERS
private static final int MAX_VARINT
private static final ResourceLocation BLOCK_TO_ITEM
private static final ResourceLocation BLOCKSTATE_TO_ID
private static final ResourceLocation SERIALIZER_TO_ENTRY
private static final ResourceLocation STRUCTURE_FEATURES
private static final ResourceLocation STRUCTURES
private static boolean hasInit
private static final boolean DISABLE_VANILLA_REGISTRIES
private static final java.util.function.BiConsumer<ResourceLocation,ForgeRegistry<?>> LOCK_VANILLA
private static java.lang.reflect.Field regName
public static void init()
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(ResourceLocation name, java.lang.Class<T> type)
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(ResourceLocation name, java.lang.Class<T> type, int min, int max)
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(ResourceLocation name, java.lang.Class<T> type, ResourceLocation _default)
public static <V extends IForgeRegistryEntry<V>> DefaultedRegistry<V> getWrapperDefaulted(java.lang.Class<? super V> cls)
public static <V extends IForgeRegistryEntry<V>> SimpleRegistry<V> getWrapper(java.lang.Class<? super V> cls)
public static ObjectIntIdentityMap<BlockState> getBlockStateIDMap()
public static java.util.Map<IDataSerializer<?>,DataSerializerEntry> getSerializerMap()
public static com.google.common.collect.BiMap<java.lang.String,Structure<?>> getStructureMap()
public static <K extends IForgeRegistryEntry<K>> K register_impl(K value)
public static void vanillaSnapshot()
public static void freezeData()
public static void revertToFrozen()
public static void revert(RegistryManager state, ResourceLocation registry, boolean lock)
private static <T extends IForgeRegistryEntry<T>> void loadRegistry(ResourceLocation registryName, RegistryManager from, RegistryManager to, java.lang.Class<T> regType, boolean freeze)
public static com.google.common.collect.Multimap<ResourceLocation,ResourceLocation> injectSnapshot(java.util.Map<ResourceLocation,ForgeRegistry.Snapshot> snapshot, boolean injectFrozenData, boolean isLocalWorld)
private static void fireRemapEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps, boolean isFreezing)
private static <T extends IForgeRegistryEntry<T>> void loadPersistentDataToStagingRegistry(RegistryManager pool, RegistryManager to, java.util.Map<ResourceLocation,java.lang.Integer[]> remaps, java.util.Map<ResourceLocation,java.lang.Integer> missing, ResourceLocation name, ForgeRegistry.Snapshot snap, java.lang.Class<T> regType)
private static <T extends IForgeRegistryEntry<T>> void processMissing(java.lang.Class<T> clazz, ResourceLocation name, RegistryManager STAGING, RegistryEvent.MissingMappings<?> e, java.util.Map<ResourceLocation,java.lang.Integer> missing, java.util.Map<ResourceLocation,java.lang.Integer[]> remaps, java.util.Collection<ResourceLocation> defaulted, java.util.Collection<ResourceLocation> failed, boolean injectNetworkDummies)
private static <T extends IForgeRegistryEntry<T>> void loadFrozenDataToStagingRegistry(RegistryManager STAGING, ResourceLocation name, java.util.Map<ResourceLocation,java.lang.Integer[]> remaps, java.lang.Class<T> clazz)
public static void fireCreateRegistryEvents()
public static void fireCreateRegistryEvents(LifecycleEventProvider lifecycleEventProvider, java.util.function.Consumer<LifecycleEventProvider> eventDispatcher)
public static void fireRegistryEvents(java.util.function.Predicate<ResourceLocation> filter, LifecycleEventProvider lifecycleEventProvider, java.util.function.Consumer<LifecycleEventProvider> eventDispatcher)
public static ResourceLocation checkPrefix(java.lang.String name, boolean warnOverrides)
name
- The name or resource locationwarnOverrides
- If true, logs a warning if domain differs from that of
the currently currently active mod containerResourceLocation
with given or inferred domainprivate static void forceRegistryName(IForgeRegistryEntry<?> entry, ResourceLocation name)