Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.
/ ReStock Public archive

Latest commit

 

History

History
88 lines (65 loc) · 3.51 KB

README.md

File metadata and controls

88 lines (65 loc) · 3.51 KB

ReStock.js

A minimal Loottable Chest or universal Container Refill craftscript


Want to support us?

☕ Donate a cup of coffee on Ko-Fi

Help us out on Patreon

Contribute to our open-source projects

Boost / Join our Discord server

Join our modded minecraft server


Prerequisites

You will need:

Instructions

  1. Install WorldEdit on your Server.
  2. Extract the Rhino Library lib/rhino-{version}.jar
    • to the plugins/ or plugins/WorldEdit folder on bukkit.
    • to the mods/ folder on other platforms.
  3. Place the craftscript to %serverroot%/config/worldedit/craftscripts/.
  4. In the same directory create a folder called restock.
  5. and place your .json container array file into that folder (name it default.json if you want to omit the filename on command execution).

Usage

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.