-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.txt
39 lines (25 loc) · 1.35 KB
/
api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Hopper API
----------
This API is kept simple by adding a single command which allows mods to add
containers like chests and furnaces to the hopper check list.
Command Usage
-------------
Make sure any mods using this function has 'hopper' in the depends.txt file.
hopper:add_container({ {"where_from", "node_name", "inventory_name"} })
'where_from' is a string telling the api that items are coming from either
the 'top' node into a hopper below, going into the 'bottom' node
from the hopper above or coming from a 'side' hopper into the
node next door.
'node_name" is the name of the container itself (e.g. "default:chest")
'inventory_name' is the name of the container inventory that is affected.
e.g.
hopper:add_container({
{"top", "default:furnace", "dst"}, -- take cooked items from above into hopper below
{"bottom", "default:furnace", "src"}, -- insert items below to be cooked from hopper above
{"side", "default:furnace", "fuel"}, -- replenish furnace fuel from hopper at side
{"void", "default:chest", "main"}, -- use void hopper to move items to chest
})
We already have support for the wine barrel inside of the Wine mod and protected
chests inside of Protector Redo, as well as default chests, furnaces and hoppers
themselves.
Note: Hoppers can transfer into locked chests but not take from them.