

Loot Block
Mod Overview
Loot Block is an addon that introduces a special block with renewable loot containers that provide random items. This modification is primarily aimed at server, map, and modpack creators, as the block itself is only available in creative mode and is not intended for standard survival gameplay.
How to Use
After installing the mod, the first step is to create a "LootCategory". You can think of it as similar to a vanilla loot table – it stores the parameters for possible rewards, the loot respawn time, and the block's color.
First, prepare all the items that should be dropped in your inventory. Then enter the command "/ccategory <name> <hex> <time>" in the chat, replacing the respective parameters with the desired values. The "name" parameter sets the category name, "hex" determines the block color in hexadecimal format (for example, 0xFF00FF corresponds to magenta), and "time" specifies the interval in ticks until loot reappears. Important: the command takes into account the quantity, metadata, and NBT tags of items from the main inventory slots but ignores armor and off-hand slots. Upon successful execution, a green message "Successfully saved name!" will appear in the chat.
To activate a LootCategory, take the Loot Block block from the Decoration Blocks creative tab and rename it using the previously assigned category name. After that, the block can be placed anywhere you like.
To add a new item to an existing category, use the command "/acategory <name>" while holding the desired item in your hand. You can remove one or all categories from the cache using the command "/rcategory <name>". Note that changes to existing categories do not apply to already placed blocks until the world is reloaded!
All created LootCategories are saved as .json files in the game's save folder, allowing for manual editing if necessary.