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

Function write

examples/book.js:47–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47async function write () {
48 const [book] = bot.inventory.items().filter(({ name }) => name === 'writable_book')
49 if (!book) {
50 bot.chat("I don't have a book.")
51 return
52 }
53 await bot.writeBook(book.slot, pages)
54 print()
55}
56
57function print () {
58 const [book] = bot.inventory.items().filter(({ name }) => name === 'writable_book')

Callers 1

book.jsFile · 0.70

Calls 2

printFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…