--[[ Minetest-mod "Invisible Wall", A mod with invisible blocks Copyright (C) 2021 J. A. Anders This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]] -- -- Mod Version 0.3 -- meseglass = {} -- Get Translator local S = minetest.get_translator("meseglass") meseglass.get_translator = S local S = meseglass.get_translator -- The Invisible Wall minetest.register_node("meseglass:block", { description = S("Invisible Block"), inventory_image = minetest.inventorycube("meseglass.png"), wield_image = minetest.inventorycube("meseglass.png"), tiles = {"meseglass.png"}, groups = {meseglass=1}, drawtype = "airlike", paramtype = "light", air_equivalent = true, sunlight_propagates = true, on_blast = function() end, }) minetest.register_tool("meseglass:dig_tool", { description = S("Tool to dig meseglass blocks"), inventory_image = "meseglass_dig_tool.png", tool_capabilities = { full_punch_intervall = 1.5, max_drop_level = 1, groupcaps = { meseglass = { uses = 100, maxlevel = 1, times = {[1]=0.6}, }, }, damage_groups = {fleshy=1}, }, }) if minetest.get_modpath("default") then minetest.register_craft({ type = "shaped", output = "meseglass:wall 5", recipe = { {"","default:glass",""}, {"default:glass","default:mese","default:glass"}, {"","default:glass",""}, }, }) minetest.register_craft({ type = "shaped", output = "meseglass:dig_tool", recipe = { {"default:diamond_block"}, {"default:stick"}, {"default:stick"}, }, }) end