HomeJavaDatapacksLG's Command Items - Easy Custom Items
LG's Command Items - Easy Custom Items
DatapacksJava

LG's Command Items - Easy Custom Items

by LordGacie · on Modrinth

This datapack adds a way to add commands directly as a component to items! Great way to add custom items with some additional features like cooldowns!

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.7–26.1.2 · Data pack⬇ Download for 1.21.7–26.1.2 · Fabric⬇ Download for 1.21.7–26.1.2 · Forge⬇ Download for 1.21.7–26.1.2 · NeoForge⬇ Download for 1.21.7–26.1.2 · Quilt
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.
LG's Command Items - Easy Custom Items — screenshot 1LG's Command Items - Easy Custom Items — screenshot 2

🔀 LG's Command Items datapack

This datapack adds a way to add commands directly to items when triggering a specific event, events stacks meaning you can have a command for Right-Click as well as a command when attacking a mob or getting attacked!

Usage Tutorial

Use /function a:open_menu command, then click Add Commands button, select your input and slot, then confirm with the red "Confirm" button, it will add the command to your selected input + slot combination

Current Triggers & Slots

Triggers

Slots

Limitations

You can only put one command into each trigger + slot combo, to use several commands, it is recommended to use functions

For any ticking trigger, I recommend not using cooldowns simply for optimization purposes, it won't fry your ticks if you don't do so, but with several players using those, it may very likely affect your performance negatively

Other Additions

⚠️ Important commands!

/function a:open_menu

/function a:copy_item

/function ci:reset_cds

🔴 YouTube Showcase

Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more