MCPcopy
hub / github.com/PrismarineJS/mineflayer / putInFurnace

Function putInFurnace

examples/chest.js:218–234  ·  view source on GitHub ↗
(where, name, amount)

Source from the content-addressed store, hash-verified

216 }
217
218 async function putInFurnace (where, name, amount) {
219 const item = itemByName(furnace.items(), name)
220 if (item) {
221 const fn = {
222 input: furnace.putInput,
223 fuel: furnace.putFuel
224 }[where]
225 try {
226 await fn.call(furnace, item.type, null, amount)
227 bot.chat(`put ${amount} ${item.name}`)
228 } catch (err) {
229 bot.chat(`unable to put ${amount} ${item.name}`)
230 }
231 } else {
232 bot.chat(`unknown item ${name}`)
233 }
234 }
235
236 async function takeFromFurnace (what) {
237 const fn = {

Callers 1

onChatFunction · 0.85

Calls 2

itemsMethod · 0.80
itemByNameFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…