Download Loot Refill — Minecraft Mods — MetaMods

Loot Refill

Active

Downloads

0

Last update

4 months ago

Versions

1.20.3 — 1.21.8
Server
Fabric
Game mechanics
Magic
Utils

Loot Refill

Loot Refill

A server-side Fabric mod that automatically replenishes the contents of chests and other containers with naturally generated loot.

Configuration Settings

The modification features a flexible configuration system through the lootrefill.toml config file located in the server's configuration folder. All parameters can be modified directly in-game or via console using commands starting with /lootrefill config, and changes can be applied with the /lootrefill config reload command. The default configuration file with explanations for each parameter is provided below:

[preferences]
    #(Default = 1800) Time interval in seconds between loot refills. Note that refill only occurs when a container is opened.
    time_until_refill = 1800
    #(Default = -1) Maximum number of refills per container. Value -1 means unlimited refills. 0 disables automatic refilling. For a specific container, this value can be changed individually.
    max_refills = 1
    #(Default = false) If enabled, a container will only refill if the number of refills by a given player is less than the maximum value.
    per_player_refill_counts = false
    #(Default = true) Refilling occurs only when the container is completely empty.
    refill_only_when_empty = true
    #(Default = false) If enabled, containers with a set loot table id and refill count less than the maximum value (or with unlimited refills) become invulnerable to players. Destruction is only possible through indirect means, such as explosions.
    protect_loot_containers = false

Manual Configuration of Loot Table ID and Maximum Refill Count

Since there's no automatic way to assign loot table ids to already looted naturally generated containers, the mod includes a special command for manual assignment:

/lootrefill setLootTableId <loot_table_id>

where <loot_table_id> is the loot table identifier from the registry.

You can also specify exact coordinates and dimension for the container when working from the console:

/lootrefill add_loot_table_id <loot_table_id> <x> <y> <z> <dimension>

The maximum number of refills for an individual container is set with the command:

/lootrefill setMaxRefillAmount <max_refill_amount>

where <max_refill_amount> is an integer value. By default, all containers have an individual maximum refill count of -1. Setting the value to 0 or higher will make the specific container use its individual value instead of the configuration settings.

This command also supports specifying position and dimension for console usage:

/lootrefill setMaxRefillAmount <max_refill_amount> <x> <y> <z> <dimension>

Project members
ArkoSammy12

ArkoSammy12

Developer

Created: 10 May 2024

ID: 17224