mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Make nodes usable when wielding an end crystal
This commit is contained in:
parent
0e206e9974
commit
3df3e957e2
1 changed files with 8 additions and 3 deletions
|
@ -86,6 +86,11 @@ minetest.register_craftitem("mcl_end:crystal", {
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
local pos = minetest.get_pointed_thing_position(pointed_thing)
|
local pos = minetest.get_pointed_thing_position(pointed_thing)
|
||||||
local node = minetest.get_node(pos).name
|
local node = minetest.get_node(pos).name
|
||||||
|
if placer and not placer:get_player_control().sneak then
|
||||||
|
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
|
||||||
|
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
if find_crystal(pos) then return itemstack end
|
if find_crystal(pos) then return itemstack end
|
||||||
if node == "mcl_core:obsidian" or node == "mcl_core:bedrock" then
|
if node == "mcl_core:obsidian" or node == "mcl_core:bedrock" then
|
||||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||||
|
|
Loading…
Reference in a new issue