ArkoSammy12 / loot-refill

A Minecraft Fabric server-side mod to automatically refill the contents of naturally generated loot containers.
MIT License
2 stars 0 forks source link

Loot Refill

This is a Fabric server-side Minecraft mod that allows chests and other contains with naturally generated loot to refill themselves automatically.

Features

The mod adds 4 Minecraft gamerules for server-admins to configure the mod with. These are:

Manually add a loot table to a container block

Since this mod uses NBT data to store the loot table IDs of naturally generated chests, this means that chests and other container blocks generated before this mod is added to the server will not be taken into account by this mod. To mitigate this, the mod includes a command to manually add a loot table ID to a container block.

To use this command, you must first have a permission level of four or higher, then look at the container block that you wish to add a loot table ID to, and run the following command:

/lootrefill add_loot_table_id <loot_table_id> 

Alternatively, you can run this command by specifying the container's coordinates as well as the dimension the container is in. This allows you to run the command via the server's console:

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

Support

If you would like to report a bug, or make a suggestion, you can do so via the mod's issue tracker or join my Discord server.

Building

Clone this repository on your PC, then open your command line prompt on the main directory of the mod, and run the command: gradlew build. Once the build is successful, you can find the mod under /loot-refill/build/libs. Use the .jar file without the "sources".