Class LootModifierManager
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
net.neoforged.neoforge.common.loot.LootModifierManager
- All Implemented Interfaces:
PreparableReloadListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final com.google.gson.Gson
static final org.apache.logging.log4j.Logger
private Map
<ResourceLocation, IGlobalLootModifier> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(Map<ResourceLocation, com.google.gson.JsonElement> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) An immutable collection of the registered loot modifiers in layered order.protected Map
<ResourceLocation, com.google.gson.JsonElement> prepare
(ResourceManager resourceManager, ProfilerFiller profilerFiller) Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener
getPreparedPath, scanDirectory
Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
GSON
private static final com.google.gson.Gson 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<ResourceLocation,com.google.gson.JsonElement> prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) - Overrides:
prepare
in classSimpleJsonResourceReloadListener
-
apply
protected void apply(Map<ResourceLocation, com.google.gson.JsonElement> resourceList, ResourceManager resourceManagerIn, ProfilerFiller profilerIn) - Specified by:
apply
in classSimplePreparableReloadListener<Map<ResourceLocation,
com.google.gson.JsonElement>>
-
getAllLootMods
An immutable collection of the registered loot modifiers in layered order.
-