Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
TotomRegister

TotomRegister

This is a mod that allows you to register totem events for specified items.

39
2
Equipment
Game Mechanics
Social

Compatibility

Minecraft: Java Edition

1.20.1

Platforms

Forge

Supported environments

Client-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Visit wiki Join Discord server

Creators

KSmc's Team
KSmc's TeamOrganization

Details

Licensed MIT
Published 5 months ago
Updated 5 months ago
DescriptionGalleryChangelogVersions

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 is open source.

main@4b75cb8

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.