forked from MineClone5/MineClone5
Fixed elytra not working when enchanted
This commit is contained in:
parent
047d75a78a
commit
5d2552eb97
|
@ -209,7 +209,7 @@ minetest.register_tool("mcl_armor:elytra", {
|
||||||
_doc_items_longdesc = mcl_armor.longdesc,
|
_doc_items_longdesc = mcl_armor.longdesc,
|
||||||
_doc_items_usagehelp = mcl_armor.usage,
|
_doc_items_usagehelp = mcl_armor.usage,
|
||||||
inventory_image = "mcl_armor_inv_elytra.png",
|
inventory_image = "mcl_armor_inv_elytra.png",
|
||||||
groups = {armor = 1, armor_torso = 1, mcl_armor_uses = 10, enchantability = 1},
|
groups = {armor = 1,non_combat_torse = 1, armor_torso = 1, mcl_armor_uses = 10, enchantability = 1},
|
||||||
sounds = {
|
sounds = {
|
||||||
_mcl_armor_equip = "mcl_armor_equip_leather",
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
||||||
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
||||||
|
|
|
@ -279,10 +279,8 @@ minetest.register_globalstep(function(dtime)
|
||||||
local fly_node = minetest.get_node({x = fly_pos.x, y = fly_pos.y - 0.5, z = fly_pos.z}).name
|
local fly_node = minetest.get_node({x = fly_pos.x, y = fly_pos.y - 0.5, z = fly_pos.z}).name
|
||||||
local elytra = mcl_playerplus.elytra[name]
|
local elytra = mcl_playerplus.elytra[name]
|
||||||
|
|
||||||
elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" or "mcl_armor:elytra_enchanted"
|
elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" and not player:get_attach() and (elytra.active or control.jump and player_velocity.y < -6) and (fly_node == "air" or fly_node == "ignore") or "mcl_armor:elytra_enchanted" and not player:get_attach() and (elytra.active or control.jump and player_velocity.y < -6) and (fly_node == "air" or fly_node == "ignore")
|
||||||
and not player:get_attach()
|
|
||||||
and (elytra.active or control.jump and player_velocity.y < -6)
|
|
||||||
and (fly_node == "air" or fly_node == "ignore")
|
|
||||||
|
|
||||||
if elytra.active then
|
if elytra.active then
|
||||||
mcl_player.player_set_animation(player, "fly")
|
mcl_player.player_set_animation(player, "fly")
|
||||||
|
|
Loading…
Reference in New Issue