set {unbreakable=1} group so mobs cannot destroy blocks
This commit is contained in:
parent
d5ff14e092
commit
3cc76fe28e
9
init.lua
9
init.lua
@ -16,12 +16,13 @@ local helper = "invisiblocks_block.png^[multiply:#ff000070"
|
|||||||
minetest.register_node("invisiblocks:barrier", {
|
minetest.register_node("invisiblocks:barrier", {
|
||||||
description = S("Invisible Barrier Block"),
|
description = S("Invisible Barrier Block"),
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
|
buildable_to = false,
|
||||||
inventory_image = helper,
|
inventory_image = helper,
|
||||||
wield_image = helper,
|
wield_image = helper,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
sounds = def and default.node_sound_glass_defaults(),
|
sounds = def and default.node_sound_glass_defaults(),
|
||||||
groups = {invisible = 1},
|
groups = {invisible = 1, unbreakable = 1},
|
||||||
on_blast = function() end
|
on_blast = function() end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ helper = "invisiblocks_block.png^[multiply:#ffff0070"
|
|||||||
minetest.register_node("invisiblocks:light", {
|
minetest.register_node("invisiblocks:light", {
|
||||||
description = S("Invisible Light Source"),
|
description = S("Invisible Light Source"),
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
|
buildable_to = false,
|
||||||
inventory_image = helper,
|
inventory_image = helper,
|
||||||
wield_image = helper,
|
wield_image = helper,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -38,7 +40,7 @@ minetest.register_node("invisiblocks:light", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
sounds = def and default.node_sound_glass_defaults(),
|
sounds = def and default.node_sound_glass_defaults(),
|
||||||
groups = {invisible = 1},
|
groups = {invisible = 1, unbreakable = 1},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||||
@ -52,13 +54,14 @@ helper = "invisiblocks_block.png^[multiply:#00ff0070"
|
|||||||
minetest.register_node("invisiblocks:mob_wall", {
|
minetest.register_node("invisiblocks:mob_wall", {
|
||||||
description = S("Invisible Mob Wall"),
|
description = S("Invisible Mob Wall"),
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
|
buildable_to = false,
|
||||||
inventory_image = helper,
|
inventory_image = helper,
|
||||||
wield_image = helper,
|
wield_image = helper,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
sounds = def and default.node_sound_glass_defaults(),
|
sounds = def and default.node_sound_glass_defaults(),
|
||||||
groups = {invisible = 1},
|
groups = {invisible = 1, unbreakable = 1},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||||
|
BIN
textures/invisiblocks_trans.png
Normal file
BIN
textures/invisiblocks_trans.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 B |
Loading…
x
Reference in New Issue
Block a user