2021-05-01 23:44:33 +00:00
|
|
|
# Mosfet Minecraft Bot
|
|
|
|
|
|
|
|
## How to Cache Items
|
|
|
|
|
2021-05-02 00:13:56 +00:00
|
|
|
![a single trapped chest with three normal double chests under it](media/cache_items.png)
|
2021-05-01 23:44:33 +00:00
|
|
|
|
2021-05-02 00:35:19 +00:00
|
|
|
Mosfet will automatically dump items into the closest [trapped
|
|
|
|
chest](https://minecraft.fandom.com/wiki/Trapped_Chest#Crafting) once his
|
2021-05-02 00:32:03 +00:00
|
|
|
inventory gets full enough. Normally this is when the number of used inventory
|
|
|
|
slots is >= 27.
|
2021-05-01 23:44:33 +00:00
|
|
|
|
2021-05-02 00:32:03 +00:00
|
|
|
If Mosfet can't find a trapped chest nearby, he will place down a normal chest
|
|
|
|
if he has one in his inventory. Then he will store the items in it.
|
|
|
|
|
|
|
|
Mosfet won't cache items related to his current job. For example, if he's
|
|
|
|
farming wood, he will keep axes, beds, chests, and food.
|
|
|
|
|
|
|
|
### Advanced Details
|
|
|
|
|
|
|
|
The global `g.minimum_cache_slots` in `bot.py` controls the minimum amount of
|
|
|
|
used slots needed to trigger item caching.
|
|
|
|
|
|
|
|
In `jobs.py`, each job calls `items.set_wanted()` and `items.set_needed()` to
|
|
|
|
control which items Mosfet shouldn't cache. No items in the "needed" list will
|
|
|
|
be cached and all items in the "wanted" list—except for one stack of each—will
|
|
|
|
be cached. The "needed" list is meant for essentials like tools, food, and beds,
|
|
|
|
while the "wanted" list is for stuff that's good to have a stack of like seeds
|
|
|
|
and saplings.
|