Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local me_controller = component.me_controller
- local amount = 100
- local selection = "minecraft:stick"
- local craftables = me_controller.getCraftables({name = selection})
- if craftables.n >= 1 then -- at least one entry found
- craftables = craftables[1] -- set craftables to first entry in list
- local retVal = craftables.request(amount) -- request to craft item(s)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement