TotomRegister 图标

TotomRegister

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/totom-register
资源信息

Minecraft 版本: 1.20.1

平台: forge

标签: equipment game-mechanics social

资源介绍

This is a mod that allows you to register totem events for specified items, and it has been open-sourced on GitHub.

You can register items using TotemRegister.register(Item item). In addition, you can set the event to trigger after activation and whether to overwrite the original event for specified items:

TotemRegister.register(Item totem, BiConsumer<ServerPlayer, ItemStack> runnable);
TotemRegister.register(Item totem, BiConsumer<ServerPlayer, ItemStack> runnable, boolean overwrite);

If you want to register multiple items at once, you can use TotemRegister.register(Class<?> clazz) to register all variables of type Item within a specified class, for example:

TotemRegister.register(Items.class);

Note: This function may throw InstantiationException and IllegalAccessException exceptions. Please use try-catch blocks to catch these exceptions.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
DepoPlugin

价格:0 墨喵币
下载量:0

查看详情
Bee Dance

价格:0 墨喵币
下载量:0

查看详情
Bouncer Golems

价格:0 墨喵币
下载量:0

查看详情
Wildborne - Photorealistic VANILLA Resource Pack

价格:0 墨喵币
下载量:0

查看详情