tModLoader

tModLoader

评价数不足
Item Check Blacklist Lib [Test]
   
奖励
收藏
已收藏
取消收藏
模组功能: 模组类库
tModLoader版本: 1.4.3
文件大小
发表于
更新日期
17.458 KB
2023 年 1 月 21 日 下午 6:42
2023 年 8 月 3 日 下午 8:35
5 项改动说明 ( 查看 )

订阅以下载
Item Check Blacklist Lib [Test]

在 にるにころ (Nil256) 的 1 个合集中
Nil256's Utilities/QoL Mods
21 件物品
描述
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.

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

引用自 tModLoader
Developed By Nil256