Interface IGlobalLootModifier

All Known Implementing Classes:
GlobalLootModifiersTest.DungeonLootEnhancerModifier, GlobalLootModifiersTest.SilkTouchTestModifier, GlobalLootModifiersTest.SmeltingEnchantmentModifier, GlobalLootModifiersTest.WheatSeedsConverterModifier, LootModifier

public interface IGlobalLootModifier
Implementation that defines what a global loot modifier must implement in order to be functional. LootModifier Supplies base functionality; most modders should only need to extend that.
Requires an GlobalLootModifierSerializer to be registered via json (see forge:loot_modifiers/global_loot_modifiers).
  • Method Summary

    Modifier and Type
    Method
    Description
    apply​(List<ItemStack> generatedLoot, LootContext context)
    Applies the modifier to the list of generated loot.
  • Method Details

    • apply

      @Nonnull List<ItemStack> apply(List<ItemStack> generatedLoot, LootContext context)
      Applies the modifier to the list of generated loot. This function needs to be responsible for checking ILootConditions as well.
      Parameters:
      generatedLoot - the list of ItemStacks that will be dropped, generated by loot tables
      context - the LootContext, identical to what is passed to loot tables
      Returns:
      modified loot drops