Class LootModifierManager
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<Identifier, IGlobalLootModifier>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<IGlobalLootModifier>
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 Stringstatic final org.apache.logging.log4j.Loggerprivate BiMap<Identifier, IGlobalLootModifier> private List<IGlobalLootModifier> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(Map<Identifier, IGlobalLootModifier> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) getId(IGlobalLootModifier modifier) Returns the ID of the given loot modifier, or null if it is not registered.Returns an iterable view of all loot modifiers, sorted in the order they should be applied.Methods inherited from class SimpleJsonResourceReloadListener
getPreparedPath, prepare, scanDirectory, scanDirectory, scanDirectoryWithModifier, 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
-
LOGGER
public static final org.apache.logging.log4j.Logger LOGGER -
FOLDER
- See Also:
-
registeredLootModifiers
-
sortedModifiers
-
-
Constructor Details
-
LootModifierManager
public LootModifierManager()
-
-
Method Details
-
apply
protected void apply(Map<Identifier, IGlobalLootModifier> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) - Specified by:
applyin classSimplePreparableReloadListener<Map<Identifier, IGlobalLootModifier>>
-
getSortedModifiers
Returns an iterable view of all loot modifiers, sorted in the order they should be applied. -
getId
Returns the ID of the given loot modifier, or null if it is not registered. -
getModifier
-