Merge pull request 'Fix Respawn Anchor Not Glowstone Consuming On Charge' (#264) from chmodsayshello/MineClone5:Respawn_Anchor_FIX into master

Reviewed-on: MineClone5/MineClone5#264
This commit is contained in:
kay27 2022-03-24 22:30:43 +00:00
commit 833e32410e
1 changed files with 4 additions and 0 deletions

View File

@ -25,6 +25,7 @@ minetest.register_node("mcl_beds:respawn_anchor",{
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()
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})
@ -55,6 +56,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
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()
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})
@ -88,6 +90,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
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()
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})
@ -121,6 +124,7 @@ minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
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()
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})