-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcrafting_table.lua
More file actions
31 lines (30 loc) · 1.26 KB
/
crafting_table.lua
File metadata and controls
31 lines (30 loc) · 1.26 KB
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
minetest.register_tool("portability:crafting_table", {
description = "Portable Crafting Table",
inventory_image = "portability_crafting_table.png",
on_place = function(itemstack, player, pointed_thing)
-- Use pointed node's on_rightclick function first, if present
if not player:get_player_control().sneak then
local new_stack = mcl_util.call_on_rightclick(itemstack, player, pointed_thing)
if new_stack then
return new_stack
end
end
mcl_crafting_table.show_crafting_form(player)
end,
on_secondary_use = function(itemstack, player, pointed_thing)
-- Use pointed node's on_rightclick function first, if present
local new_stack = mcl_util.call_on_rightclick(itemstack, player, pointed_thing)
if new_stack then
return new_stack
end
mcl_crafting_table.show_crafting_form(player)
end
})
minetest.register_craft({
output = "portability:crafting_table",
recipe = {
{"mcl_throwing:ender_pearl","mcl_throwing:ender_pearl","mcl_throwing:ender_pearl"},
{"mcl_throwing:ender_pearl","mcl_crafting_table:crafting_table","mcl_throwing:ender_pearl"},
{"mcl_throwing:ender_pearl","mcl_throwing:ender_pearl","mcl_throwing:ender_pearl"}
}
})