tModLoader

tModLoader

Not enough ratings
Item Check Blacklist Lib [Test]
   
Award
Favorite
Favorited
Unfavorite
Mod Features: Library
Mod Side: Both
tModLoader Version: 1.4.3
File Size
Posted
Updated
17.458 KB
21 Jan, 2023 @ 6:42pm
3 Aug, 2023 @ 8:35pm
5 Change Notes ( view )

Subscribe to download
Item Check Blacklist Lib [Test]

In 1 collection by にるにころ (Nil256)
Nil256's Utilities/QoL Mods
21 items
Description
Item Check Blacklist Library

by Nil256

----------------------------------------

This mod provides a blacklist feature of Item Checklist mod.
You can add items to the blacklist by Mod.Call.

----------------------------------------

< Usage >

ItemCheckBlacklist.Call("Add", int itemType);
ItemCheckBlacklist.Call("Add", params int[] itemType);
ItemCheckBlacklist.Call("Add", int[] itemTypes);
ItemCheckBlacklist.Call("Add", List<int> itemTypes);

ItemCheckBlacklist.Call("AddWithCondition", int itemType, Func<bool> conditionToAddToBlacklist);
(AddWithCondition is useful when you'd like to change blacklist depends on each world.)
(The Func<bool> is called on ModPlayer.OnEnterWorld.)

----------------------------------------

For example:
public override Load()
{
if (ModLoader.TryGetMod("ItemCheckBlacklist", out Mod ItemCheckBlacklist))
{
ItemCheckBlacklist.Call("Add", ModContent.ItemType<Items.YourItem>());
}
}

----------------------------------------

Note:
If Item Checklist implements a blacklist, this mod will be deleted.
There may possibility that this mod is deleted on the future.

----------------------------------------

Originally posted by tModLoader:
Developed By Nil256