mg76

table_registration.lua

Mar 10th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.49 KB | None | 0 0
  1. local table = {
  2.     {"acacia_wood", "Acacia Wood"},
  3.     {"aspen_wood", "Aspen Wood"},
  4.     {"obsidian", "obsidian_table", "Obsidian"},
  5.     {"sandstone_brick", "Sandstone Brick"},
  6.     {"cobble", "Cobble"},
  7.     {"junglewood", "Jungle Wood"},
  8.     {"steel_block", "Steel Block"},
  9.     {"brick", "Brick"},
  10.     {"stone", "Stone"},
  11.     {"silver_sandstone", "Silver Sandstone"},
  12.     {"copper_block", "Copper Block"},
  13.     {"stone_brick", "Stone Brick"},
  14.     {"bronze_block", "Bronze Block"},
  15.     {"gold_block", "Gold Block"},
  16. }
  17.  
  18. for _, table in pairs(table) do
  19.    
  20.     --table node registrations
  21.    
  22.     minetest.register_node("dz:" .. table[1] .. "_table", {
  23.         description = table[2] .. " Table",
  24.     tiles = {
  25.         "default_" .. table[1] .. ".png",
  26.         "default_" .. table[1] .. ".png",
  27.         "default_" .. table[1] .. ".png",
  28.         "default_" .. table[1] .. ".png",
  29.         "default_" .. table[1] .. ".png",
  30.         "default_" .. table[1] .. ".png"
  31.     },
  32.     drawtype = "nodebox",
  33.     paramtype = "light",
  34.     paramtype2 = "facedir",
  35.         node_box = {
  36.         type = "fixed",
  37.         fixed = {
  38.             {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, -- NodeBox1
  39.             {-0.1875, -0.375, -0.1875, 0.1875, -0.25, 0.1875}, -- NodeBox2
  40.             {-0.125, -0.3125, -0.125, 0.125, -0.125, 0.125}, -- NodeBox3
  41.             {-0.0625, -0.5, -0.0625, 0.0625, 0.25, 0.0625}, -- NodeBox4
  42.             {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox5
  43.             {-0.125, 0.125, -0.125, 0.125, 0.25, 0.125}, -- NodeBox6
  44.             {-0.1875, 0.25, -0.1875, 0.1875, 0.375, 0.1875}, -- NodeBox7
  45.         }
  46.     }
  47. })
Advertisement
Add Comment
Please, Sign In to add comment