promotional bannermobile promotional banner

Lootr Container Compat

Automatic Lootr compatibility for eligible modded containers with safe loot recovery and original container behavior preserved.

Lootr Container Compat

Lootr Container Compat extends Lootr’s per-player loot system to eligible generated containers that Lootr does not manage automatically.

The mod is designed for modpacks with custom structures and containers, allowing compatible containers to use Lootr’s individual loot system while preserving their original BlockEntity, appearance and behavior.

Why Lootr Container Compat?

During development, I considered creating a completely independent per-player loot system instead of relying on Lootr. However, I decided that a compatibility approach was the better choice.

By working alongside Lootr, the mod can handle containers that Lootr does not detect automatically while still benefiting from Lootr's existing compatibility with containers and mods that our system may not recognize.

This gives modpacks two layers of compatibility: when Lootr can manage a container, it continues to do so normally; when Lootr does not manage it, Lootr Container Compat can attempt to detect, recover and convert the container without replacing its original BlockEntity.

The goal is to increase the chances that generated containers across large modpacks can provide individual loot for each player while keeping the original behavior of the mods that created them.

Features

• Automatic compatibility for eligible generated containers not managed by Lootr.

• Per-player loot using Lootr, allowing each player to receive their own loot independently.

• Original Container Preservation — Keeps the original BlockEntity instead of replacing it with another container.

• Player-Placed Protection — Containers placed by players are ignored to prevent unwanted conversion or item loss.

• Loot Table Recovery — Attempts to recover the original Loot Table when it is no longer stored in the container.

• Structure-Based Recovery — Can attempt to identify the structure that generated a container and recover its Loot Table when enough information is available.

• Safe Inference — Containers are only converted when the Loot Table can be determined safely. Ambiguous containers are left untouched.

• Persistent Data — Converted containers retain their compatibility data after leaving and rejoining the world or restarting the server.

• Blacklists — Allows specific containers or entire mod namespaces to be excluded.

• Lootr Integration — Respects Lootr’s existing management and breaking configuration.

• No Appearance Changes — The mod does not replace the original container’s textures, models or appearance.

Commands

/lootrc inspect

Displays information about the targeted container, including its Loot Table, compatibility status and recovery information.

/lootrc reload

Reloads the mod configuration.

/lootrc refill <x> <y> <z> <loot_table>

Manually assigns a Loot Table to a compatible container.

Configuration

Configuration file:

config/lootr_container_compat.json

General

enabled

Enables or disables the mod.

scan_loaded_chunks

Controls whether the mod performs its configured checks for containers in loaded chunks.

debug_logging

Enables additional diagnostic information in the log.

Loot Table Recovery

infer_block_loot_tables

Allows the mod to attempt to infer a missing Loot Table from the container's block information.

infer_structure_loot_tables

Allows the mod to attempt to recover a missing Loot Table by analyzing the structure associated with the container.

infer_only_with_player_placed_property

Controls whether the corresponding inference checks require a recognized property that can distinguish containers placed by players.

Player-Placed Detection

player_placed_properties

Defines the block-state property names the mod checks when determining whether a container was placed by a player.

Default properties:

player_placed
playerPlaced

Container Sizes

supported_sizes

Defines which inventory sizes the mod is allowed to manage.

Default sizes:

9, 18, 27, 36, 45, 54

Blacklists

blacklisted_mods

A list of mod IDs whose containers should always be ignored.

Example:

voidz

blacklisted_containers

A list of specific container block IDs that should be ignored.

Example:

adventurez:shadow_chest

By default, the Shadow Chest is blacklisted because it uses custom loot and progression behavior.

Requirements

Minecraft 1.20.1
Fabric
Fabric API
Lootr (Fabric)
Java 17

Credits

This mod extends and relies on the loot system provided by Lootr (Fabric), created by Noobanidus and the Lootr team.

Lootr is required for Lootr Container Compat to function.

Created by zClashTM.

License

Lootr Container Compat is distributed under the MIT License.

Lootr Container Compat Team

profile avatar
Owner
  • 4
    Followers
  • 20
    Projects
  • 1.5K
    Downloads

More from zClashView all