Class LootModifierManager

java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<com.google.gson.JsonElement>
net.neoforged.neoforge.common.loot.LootModifierManager
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public class LootModifierManager extends net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<com.google.gson.JsonElement>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
     
    private static final com.google.gson.Gson
     
    static final org.apache.logging.log4j.Logger
     
    private Map<net.minecraft.resources.ResourceLocation,IGlobalLootModifier>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> resourceList, net.minecraft.server.packs.resources.ResourceManager resourceManagerIn, net.minecraft.util.profiling.ProfilerFiller profilerIn)
     
    An immutable collection of the registered loot modifiers in layered order.
    protected Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>
    prepare(net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profilerFiller)
     

    Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener

    getPreparedPath, scanDirectory, scanDirectory, scanDirectoryWithOptionalValues

    Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener

    reload

    Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener

    getContext, getRegistryLookup, injectContext, makeConditionalOps, 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

      private Map<net.minecraft.resources.ResourceLocation,IGlobalLootModifier> registeredLootModifiers
    • folder

      private static final String folder
      See Also:
  • Constructor Details

    • LootModifierManager

      public LootModifierManager()
  • Method Details

    • prepare

      protected Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> prepare(net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profilerFiller)
      Overrides:
      prepare in class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<com.google.gson.JsonElement>
    • apply

      protected void apply(Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement> resourceList, net.minecraft.server.packs.resources.ResourceManager resourceManagerIn, net.minecraft.util.profiling.ProfilerFiller profilerIn)
      Specified by:
      apply in class net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,com.google.gson.JsonElement>>
    • getAllLootMods

      public Collection<IGlobalLootModifier> getAllLootMods()
      An immutable collection of the registered loot modifiers in layered order.