Guest User

Untitled

a guest
Dec 20th, 2018
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_node("stone:brick_1", {
  2.     description = "Brick",
  3.     paramtype2 = "facedir",
  4.     place_param2 = 0,
  5.     tiles = {"stone_brick_1.png"},
  6.     is_ground_content = false,
  7.     groups = {cracky = 3},
  8.     sounds = default.node_sound_stone_defaults(),
  9.     drop = {},
  10.  
  11.     on_place = function(itemstack, placer, pointed_thing)
  12.         local stack = ItemStack("stone:brick_" .. math.random(1,3))
  13.         local ret = minetest.item_place(stack, placer, pointed_thing)
  14.         return ItemStack("stone:brick_1 " ..
  15.             itemstack:get_count() - (1 - ret:get_count()))
  16.     end,
  17. })
  18.  
  19. for i = 2, 3 do
  20.     minetest.register_node("stone:brick_" .. i, {
  21.         description = "Brick",
  22.         tiles = {"stone_brick_" .. i .. ".png"},
  23. --      inventory_image = "stone_brick_" .. i .. ".png",
  24. --      wield_image = "stone_brick_" .. i .. ".png",
  25.         groups = {cracky = 3, not_in_creative_inventory =1},
  26.         sounds = default.node_sound_stone_defaults(),
  27.         drop = {},
  28.     })
  29. end
RAW Paste Data