Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created December 17, 2012 18:22
Show Gist options
  • Save PilzAdam/4320583 to your computer and use it in GitHub Desktop.
Save PilzAdam/4320583 to your computer and use it in GitHub Desktop.
--[[minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
itemstack:add_item(itemstack:get_name())
end)]]
minetest.register_node(":default:glass", {
description = "Glass",
drawtype = "glasslike",
tiles = {"default_glass.png"},
inventory_image = minetest.inventorycube("default_glass.png"),
paramtype = "light",
sunlight_propagates = true,
is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
after_place_node = function(pos, placer, itemstack)
itemstack:add_item(itemstack:get_name())
end,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment