Package net.minecraftforge.common.loot
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 anGlobalLootModifierSerializer
to be registered via json (see forge:loot_modifiers/global_loot_modifiers).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ItemStack>
apply(java.util.List<ItemStack> generatedLoot, LootContext context)
Applies the modifier to the list of generated loot.
-
-
-
Method Detail
-
apply
@Nonnull java.util.List<ItemStack> apply(java.util.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 tablescontext
- the LootContext, identical to what is passed to loot tables- Returns:
- modified loot drops
-
-