forked from MineClone5/MineClone5
fixed formating of respawn_ancher.lua file
This commit is contained in:
parent
c9470b8262
commit
2ea868ba79
|
@ -5,14 +5,14 @@
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor",{
|
minetest.register_node("mcl_beds:respawn_anchor",{
|
||||||
description="Respawn Anchor",
|
description="Respawn Anchor",
|
||||||
tiles = {
|
tiles = {
|
||||||
"respawn_anchor_top_off.png",
|
"respawn_anchor_top_off.png",
|
||||||
"respawn_anchor_bottom.png",
|
"respawn_anchor_bottom.png",
|
||||||
"respawn_anchor_side0.png"
|
"respawn_anchor_side0.png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box= { --Reused the composter nodebox, since it is basicly the same
|
node_box= { --Reused the composter nodebox, since it is basicly the same
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
||||||
|
@ -22,28 +22,27 @@ minetest.register_node("mcl_beds:respawn_anchor",{
|
||||||
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
|
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
||||||
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
|
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
else
|
else
|
||||||
if pos.y < -29077 or pos.y > -28933 then
|
if pos.y < -29077 or pos.y > -28933 then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
groups = {pickaxey=1, material_stone=1},
|
groups = {pickaxey=1, material_stone=1},
|
||||||
_mcl_hardness = 22.5
|
_mcl_hardness = 22.5
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
|
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
|
||||||
description="Respawn Anchor",
|
description="Respawn Anchor",
|
||||||
tiles = {
|
tiles = {
|
||||||
"portal.png",
|
"portal.png",
|
||||||
"respawn_anchor_bottom.png",
|
"respawn_anchor_bottom.png",
|
||||||
"respawn_anchor_side1.png"
|
"respawn_anchor_side1.png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box= { --Reused the composter nodebox, since it is basicly the same
|
node_box= { --Reused the composter nodebox, since it is basicly the same
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
||||||
|
@ -53,31 +52,31 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
||||||
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
|
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
else
|
else
|
||||||
if pos.y < -29077 or pos.y > -28933 then
|
if pos.y < -29077 or pos.y > -28933 then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
||||||
else
|
else
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
mcl_spawn.set_spawn_pos(player, pos, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
||||||
_mcl_hardness = 22.5
|
_mcl_hardness = 22.5
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
|
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
|
||||||
description="Respawn Anchor",
|
description="Respawn Anchor",
|
||||||
tiles = {
|
tiles = {
|
||||||
"portal.png",
|
"portal.png",
|
||||||
"respawn_anchor_bottom.png",
|
"respawn_anchor_bottom.png",
|
||||||
"respawn_anchor_side2.png"
|
"respawn_anchor_side2.png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box= { --Reused the composter nodebox, since it is basicly the same
|
node_box= { --Reused the composter nodebox, since it is basicly the same
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
||||||
|
@ -87,31 +86,31 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
||||||
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
|
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
else
|
else
|
||||||
if pos.y < -29077 or pos.y > -28933 then
|
if pos.y < -29077 or pos.y > -28933 then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
||||||
else
|
else
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
mcl_spawn.set_spawn_pos(player, pos, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
||||||
_mcl_hardness = 22.5
|
_mcl_hardness = 22.5
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
|
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
|
||||||
description="Respawn Anchor",
|
description="Respawn Anchor",
|
||||||
tiles = {
|
tiles = {
|
||||||
"portal.png",
|
"portal.png",
|
||||||
"respawn_anchor_bottom.png",
|
"respawn_anchor_bottom.png",
|
||||||
"respawn_anchor_side3.png"
|
"respawn_anchor_side3.png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box= { --Reused the composter nodebox, since it is basicly the same
|
node_box= { --Reused the composter nodebox, since it is basicly the same
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
||||||
|
@ -121,53 +120,56 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
|
||||||
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
|
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
else
|
else
|
||||||
if pos.y < -29077 or pos.y > -28933 then
|
if pos.y < -29077 or pos.y > -28933 then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
||||||
else
|
else
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
mcl_spawn.set_spawn_pos(player, pos, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
||||||
_mcl_hardness = 22.5
|
_mcl_hardness = 22.5
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
|
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
|
||||||
description="Respawn Anchor",
|
description="Respawn Anchor",
|
||||||
tiles = {
|
tiles = {
|
||||||
"portal.png",
|
"portal.png",
|
||||||
"respawn_anchor_bottom.png",
|
"respawn_anchor_bottom.png",
|
||||||
"respawn_anchor_side4.png"
|
"respawn_anchor_side4.png"
|
||||||
},
|
},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box= { --Reused the composter nodebox, since it is basicly the same
|
node_box= { --Reused the composter nodebox, since it is basicly the same
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
|
||||||
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
|
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
|
||||||
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
|
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
|
||||||
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
|
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_rightclick = function(pos, node, player, itemstack)
|
on_rightclick = function(pos, node, player, itemstack)
|
||||||
if pos.y < -29077 or pos.y > -28933 then
|
if pos.y < -29077 or pos.y > -28933 then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
|
||||||
else
|
else
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
mcl_spawn.set_spawn_pos(player, pos, nil)
|
||||||
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
|
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
|
||||||
_mcl_hardness = 22.5
|
_mcl_hardness = 22.5
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({ output = "mcl_beds:respawn_anchor",
|
minetest.register_craft({ output = "mcl_beds:respawn_anchor",
|
||||||
recipe = { {"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
|
recipe = {
|
||||||
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
|
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
|
||||||
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"} } })
|
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
|
||||||
|
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue