Milo: remote learn + remove logger

This commit is contained in:
kepler155c@gmail.com
2019-01-22 15:50:37 -05:00
parent e4cfba5750
commit 4276ea533f
13 changed files with 363 additions and 282 deletions

View File

@@ -0,0 +1,26 @@
local Sound = require('sound')
local args = { ... }
local context = args[1]
local function learn()
context:sendRequest({
request = 'craft',
slot = 15,
})
end
context.responseHandlers['craft'] = function(response)
if response.success then
Sound.play('entity.item.pickup')
else
Sound.play('entity.villager.no')
end
end
return {
menuItem = 'Learn Recipe',
callback = function()
learn()
end,
}