mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
More portal opener fixes
This commit is contained in:
parent
05657fae9e
commit
1f840e4cfc
2 changed files with 5 additions and 4 deletions
|
@ -372,17 +372,18 @@ minetest.override_item("mcl_end:ender_eye", {
|
||||||
on_place = function(itemstack, user, pointed_thing)
|
on_place = function(itemstack, user, pointed_thing)
|
||||||
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name] --new
|
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name] --new
|
||||||
|
|
||||||
|
-- If used on frame, open portal
|
||||||
if pointed_thing.under and minetest.get_node(pointed_thing.under).name == "mcl_nether:red_nether_brick" then
|
if pointed_thing.under and minetest.get_node(pointed_thing.under).name == "mcl_nether:red_nether_brick" then
|
||||||
make_end_portal(pointed_thing.under)
|
make_end_portal(pointed_thing.under)
|
||||||
minetest.sound_play(
|
minetest.sound_play(
|
||||||
"fire_flint_and_steel",
|
"fire_flint_and_steel",
|
||||||
{pos = pointed_thing.above, gain = 0.5, max_hear_distance = 8}
|
{pos = pointed_thing.above, gain = 0.5, max_hear_distance = 8}
|
||||||
)
|
)
|
||||||
end
|
|
||||||
|
|
||||||
if not minetest.setting_getbool("creative_mode") and used == true then
|
if not minetest.setting_getbool("creative_mode") and used == true then
|
||||||
itemstack:take_item() -- 1 use
|
itemstack:take_item() -- 1 use
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -398,7 +398,7 @@ minetest.override_item("mcl_fire:flint_and_steel", {
|
||||||
local used = false
|
local used = false
|
||||||
|
|
||||||
if pointed_thing.under and minetest.get_node(pointed_thing.under).name == "mcl_core:obsidian" then
|
if pointed_thing.under and minetest.get_node(pointed_thing.under).name == "mcl_core:obsidian" then
|
||||||
done = make_portal(pointed_thing.under)
|
make_portal(pointed_thing.under)
|
||||||
else
|
else
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
||||||
|
|
Loading…
Reference in a new issue