A minimal Loottable Chest or universal Container Refill craftscript
Want to support us?
☕ Donate a cup of coffee on Ko-Fi
Contribute to our open-source projects
Boost / Join our Discord server
Join our modded minecraft server
You will need:
- A .json file with an array of container coordinates that you want to refill.
- A .json loottable (if you want to use a custom loottable).
- The WorldEdit Plugin.
- The Rhino 1.7.11 (or higher) Library.
- Install WorldEdit on your Server.
- Extract the Rhino Library
lib/rhino-{version}.jar
- to the
plugins/
orplugins/WorldEdit
folder on bukkit. - to the
mods/
folder on other platforms.
- to the
- Place the craftscript to
%serverroot%/config/worldedit/craftscripts/
. - In the same directory create a folder called
restock
. - and place your .json container array file into that folder (name it
default.json
if you want to omit the filename on command execution).
Command syntax:
/cs restock <namespace/lootTable> <forceReplace> <coordFile>
namespace/lootTable [?]:
- Which loottable to fill from.
- eg.
mctools:chests/loot_table
forceReplace [true|false]:
- If blocks that aren't the target container should become the target container
- BE VERY CAREFUL WITH THIS
- TRIPPLE CHECK IF YOUR COORDS ARE CORRECT
- IT CAN'T BE UNDONE!
coordFile [restock/loot]:
- The file with coordinates of containers to fill (without
.json
) - You can leave out this argument if your file is called
default.json
. - Currently the json looks like this:
[[54, -70, 28, -118],...] or [[TARGET ID, X, Y, Z],...]
- Target ID is the Container that you want to fill and/or place at the position
- (I personly only recommend 54 which is a normal chest, but do as you please)
- If you need to generate this file take a look at this project.