]> git.lizzy.rs Git - Crafter.git/blob - mods/craftingtable/init.lua
remove server debug
[Crafter.git] / mods / craftingtable / init.lua
1 --this is where the crafting bench is defined
2 crafting_table_formspec = "size[9,8.75]"..
3                 "background[-0.19,-0.25;9.41,9.49;crafting_inventory_workbench.png]"..
4                 "listcolors[#8b8a89;#c9c3c6;#3e3d3e;#000000;#FFFFFF]"..
5                 "list[current_player;main;0,4.5;9,1;]".. --hot bar
6                 "list[current_player;main;0,6;9,3;9]".. --big part
7                 "list[current_player;craft;1.75,0.5;3,3;]"..
8                 "list[current_player;craftpreview;6.1,1.5;1,1;]"..
9                 "listring[current_player;main]"..
10                 "listring[current_player;craft]"
11
12 minetest.register_node("craftingtable:craftingtable", {
13     description = "Crafting Table",
14     tiles = {"crafting_workbench_top.png", "wood.png", "crafting_workbench_side.png",
15                 "crafting_workbench_side.png", "crafting_workbench_front.png", "crafting_workbench_front.png"},
16     groups = {wood = 1, hard = 1, axe = 1, hand = 3,pathable = 1},
17     sounds = main.woodSound(),
18     on_rightclick = function(pos, node, player, itemstack)
19                 player:get_inventory():set_width("craft", 3)
20                 player:get_inventory():set_size("craft", 9)
21
22                 minetest.show_formspec(player:get_player_name(), "main", crafting_table_formspec)
23         end,
24 })
25 minetest.register_craft({
26         output = "craftingtable:craftingtable",
27         recipe = {
28                 {"main:wood","main:wood"},
29                 {"main:wood","main:wood"}
30         }
31 })