Merge pull request 'Make elytra enchantable and the enchanted elytra usable' (#3637) from elytra_enchantable into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3637 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>skelly_horse_thunder
commit
2c01240a56
|
@ -219,7 +219,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, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10},
|
groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10, enchantability = 1, elytra = 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",
|
||||||
|
|
|
@ -239,7 +239,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
elytra.speed = 1 - (direction.y/2 + 0.5)
|
elytra.speed = 1 - (direction.y/2 + 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
elytra.active = player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra"
|
elytra.active = minetest.get_item_group(player:get_inventory():get_stack("armor", 3):get_name(), "elytra") ~= 0
|
||||||
and not parent
|
and not parent
|
||||||
and (elytra.active or (is_just_jumped and player_velocity.y < -0))
|
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 minetest.registered_nodes[fly_node].walkable) or fly_node == "ignore")
|
||||||
|
|
Loading…
Reference in New Issue