Class ReloadableServerResources
java.lang.Object
net.minecraft.server.ReloadableServerResources
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerAdvancementManagerprivate final Commandsprivate final ConditionContextprivate static final CompletableFuture<Unit> private final ReloadableServerRegistries.Holderprivate final ServerFunctionLibraryprivate final HolderLookup.Providerprivate static final org.slf4j.Loggerprivate final List<DataComponentInitializers.PendingComponents<?>> private final List<Registry.PendingTags<?>> private final RecipeManagerprivate final RegistryAccessprivate final Map<ListenerKey<?>, PreparableReloadListener> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateReloadableServerResources(LayeredRegistryAccess<RegistryLayer> fullLayers, HolderLookup.Provider loadingContext, FeatureFlagSet enabledFeatures, Commands.CommandSelection commandSelection, List<Registry.PendingTags<?>> postponedTags, PermissionSet functionCompilationPermissions, List<DataComponentInitializers.PendingComponents<?>> newComponents) -
Method Summary
Modifier and TypeMethodDescriptionExposes the current condition context for usage in other reload listeners.
This is not useful outside the reloading stage.<T extends PreparableReloadListener>
TgetListener(ListenerKey<T> key) Returns the reload listener registered with the provided key.Returns the lookup provider access for the currently active reload.loadResources(ResourceManager resourceManager, LayeredRegistryAccess<RegistryLayer> contextLayers, List<Registry.PendingTags<?>> updatedContextTags, FeatureFlagSet enabledFeatures, Commands.CommandSelection commandSelection, PermissionSet functionCompilationPermissions, Executor backgroundExecutor, Executor mainThreadExecutor) void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DATA_RELOAD_INITIAL_TASK
-
fullRegistryHolder
-
commands
-
recipes
-
advancements
-
functionLibrary
-
postponedTags
-
newComponents
-
registryAccess
-
loadingContext
-
context
-
retainedListeners
-
-
Constructor Details
-
ReloadableServerResources
private ReloadableServerResources(LayeredRegistryAccess<RegistryLayer> fullLayers, HolderLookup.Provider loadingContext, FeatureFlagSet enabledFeatures, Commands.CommandSelection commandSelection, List<Registry.PendingTags<?>> postponedTags, PermissionSet functionCompilationPermissions, List<DataComponentInitializers.PendingComponents<?>> newComponents)
-
-
Method Details
-
getFunctionLibrary
-
fullRegistries
-
getRecipeManager
-
getCommands
-
getAdvancements
-
listeners
-
getListener
Returns the reload listener registered with the provided key.- Returns:
- the reload listener registered with the provided key
-
getConditionContext
Exposes the current condition context for usage in other reload listeners.
This is not useful outside the reloading stage.- Returns:
- The condition context for the currently active reload.
-
getRegistryLookup
Returns the lookup provider access for the currently active reload.- Returns:
- the lookup provider access for the currently active reload
-
loadResources
public static CompletableFuture<ReloadableServerResources> loadResources(ResourceManager resourceManager, LayeredRegistryAccess<RegistryLayer> contextLayers, List<Registry.PendingTags<?>> updatedContextTags, FeatureFlagSet enabledFeatures, Commands.CommandSelection commandSelection, PermissionSet functionCompilationPermissions, Executor backgroundExecutor, Executor mainThreadExecutor) -
updateComponentsAndStaticRegistryTags
public void updateComponentsAndStaticRegistryTags()
-