Download Loot Crates — Minecraft Mods — MetaMods

Loot Crates

Active

Downloads

0

Last update

5 years ago
Client
Fabric
Quilt
Forge
Neoforge
Utils

Loot Crates

Add Random Rewards to Your Minecraft World

This mod enables you to create special containers that distribute randomized item sets when opened by players. Each container is individually configurable via XML configuration.

How to Create Reward Containers

Start by creating a container name in the lootcrate.xml file located in the config folder. The default name used is "TestCrate1". Then in the game, use an anvil to rename a standard container exactly as specified in the configuration.

Configuring Container Contents

All settings are made exclusively through the lootcrate.xml file. Here's an example of adding items:

<Crates>
    <Crate name="TestCrate1">
        <Key id="minecraft:stick" color="red" name="NameHere">
            <Tag>{display:{Lore:["LoreHere"]}}</Tag>
        </Key>
        <Reward r="10">
            <Item id="minecraft:redstone" n="10"/>
            <Item id="minecraft:emerald"/>
        </Reward>

Managing Drop Probabilities

The "r" parameter determines the relative chance of each item dropping. The higher the value, the greater the probability of receiving that reward:

<Reward r="10">
    <Item id="minecraft:emerald"/>
</Reward>
<Reward r="10">
    <Item id="minecraft:emerald"/>
</Reward>
<Reward r="5">
    <Item id="minecraft:emerald"/>
</Reward>
<Reward r="5">
    <Item id="minecraft:emerald"/>
</Reward>

In this example, the final probabilities will be as follows:

  • Rewards with r=10: each 30% chance (60% total)
  • Rewards with r=5: each 15% chance (30% total)

The total probability always equals 100%.

Convenient Administrator Commands

The mod includes useful commands for administration:

  • /lc reload - allows reloading the configuration during server operation without restarting
  • /lckey player TestCrate1 - gives a key for the specified container to a player

The ability to perform "hot" configuration reloading is particularly convenient when testing new settings.

Project members
Thutmose_III

Thutmose_III

karagraa

karagraa

Created: 26 May 2020

ID: 26857