Class LootModifierManager
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<Identifier, JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<JsonElement>
net.neoforged.neoforge.common.loot.LootModifierManager
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface PreparableReloadListener
PreparableReloadListener.PreparationBarrier, PreparableReloadListener.SharedState, PreparableReloadListener.StateKey<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Gsonstatic final org.apache.logging.log4j.Loggerprivate Map<Identifier, IGlobalLootModifier> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(Map<Identifier, JsonElement> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) An immutable collection of the registered loot modifiers in layered order.protected Map<Identifier, JsonElement> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) Performs any reloading that can be done off-thread, such as file IOMethods inherited from class SimpleJsonResourceReloadListener
getPreparedPath, scanDirectory, scanDirectory, scanDirectoryWithOptionalValuesMethods inherited from class SimplePreparableReloadListener
reloadMethods inherited from class ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps, makeConditionalOpsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PreparableReloadListener
getName, prepareSharedState
-
Field Details
-
GSON
-
LOGGER
public static final org.apache.logging.log4j.Logger LOGGER -
registeredLootModifiers
-
folder
- See Also:
-
-
Constructor Details
-
LootModifierManager
public LootModifierManager()
-
-
Method Details
-
prepare
protected Map<Identifier, JsonElement> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) Description copied from class:SimpleJsonResourceReloadListenerPerforms any reloading that can be done off-thread, such as file IO- Overrides:
preparein classSimpleJsonResourceReloadListener<JsonElement>
-
apply
protected void apply(Map<Identifier, JsonElement> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) - Specified by:
applyin classSimplePreparableReloadListener<Map<Identifier, JsonElement>>
-
getAllLootMods
An immutable collection of the registered loot modifiers in layered order.
-