diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index 5836b6fe2..69cb00d07 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -239,10 +239,11 @@ minetest.register_globalstep(function(dtime) elytra.speed = 1 - (direction.y/2 + 0.5) end + local fly_node_walkable = minetest.registered_nodes[fly_node] and minetest.registered_nodes[fly_node].walkable elytra.active = minetest.get_item_group(player:get_inventory():get_stack("armor", 3):get_name(), "elytra") ~= 0 and not parent and (elytra.active or (is_just_jumped and player_velocity.y < -0)) - and ((not minetest.registered_nodes[fly_node].walkable) or fly_node == "ignore") + and ((not fly_node_walkable) or fly_node == "ignore") if elytra.active then if is_just_jumped then -- move the player up when they start flying to give some clearance