Holds a set of implementations of ILootModifier of common usage.
These can be used freely instead of rewriting the same code more than once. They are also guaranteed to behave correctly.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
Adds the given IItemStack to the drops.
CommonLootModifiers.add(stack as IItemStack) as ILootModifier
Adds all the given IItemStack to the drops.
CommonLootModifiers.addAll(stacks as IItemStack) as ILootModifier
Clears the entire drop list.
CommonLootModifiers.clearLoot() as ILootModifier CommonLootModifiers.clearLoot();
Removes every instance of the targeted IIngredient from the drops.
CommonLootModifiers.remove(target as IIngredient) as ILootModifier
Removes every instance of all the targeted IIngredients from the drops.
CommonLootModifiers.removeAll(targets as IIngredient) as ILootModifier
CommonLootModifiers.replaceAllWith(replacementMap as IItemStack[IIngredient]) as ILootModifier
CommonLootModifiers.replaceWith(target as IIngredient, replacement as IItemStack) as ILootModifier