Merge branch 'master' into damage

This commit is contained in:
Elias Fleckenstein 2021-04-26 09:29:03 +02:00
commit dd68b79782
3 changed files with 30 additions and 2 deletions

View file

@ -9,7 +9,7 @@
## Maintainers ## Maintainers
* Fleckenstein * Fleckenstein
* kay27 * kay27
* oilboi * jordan4ibanez
## Developers ## Developers
* bzoss * bzoss
@ -74,7 +74,7 @@
* Rochambeau * Rochambeau
* rubenwardy * rubenwardy
* stu * stu
* oilboi * jordan4ibanez
* 4aiman * 4aiman
* Kahrl * Kahrl
* Krock * Krock

View file

@ -202,12 +202,30 @@ Stained glass is a decorative and mostly transparent block which comes in variou
Stick= Stick=
Sticks are a very versatile crafting material; used in countless crafting recipes.= Sticks are a very versatile crafting material; used in countless crafting recipes.=
Stone= Stone=
Stripped Acacia Log=
Stripped Acacia Wood=
Stripped Birch Log=
Stripped Birch Wood=
Stripped Dark Oak Log=
Stripped Dark Oak Wood=
Stripped Jungle Log=
Stripped Jungle Wood=
Stripped Oak Log=
Stripped Oak Wood=
Stripped Spruce Log=
Stripped Spruce Wood=
Stone Bricks= Stone Bricks=
Sugar= Sugar=
Sugar Canes= Sugar Canes=
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.= Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.= Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=
Sugar comes from sugar canes and is used to make sweet foods.= Sugar comes from sugar canes and is used to make sweet foods.=
The stripped trunk of an acacia tree.=
The stripped trunk of an birch tree.=
The stripped trunk of an dark oak tree.=
The stripped trunk of an jungle tree.=
The stripped trunk of an oak tree.=
The stripped trunk of an spruce tree.=
The trunk of a birch tree.= The trunk of a birch tree.=
The trunk of a dark oak tree.= The trunk of a dark oak tree.=
The trunk of a jungle tree.= The trunk of a jungle tree.=
@ -216,6 +234,7 @@ The trunk of an acacia.=
The trunk of an oak tree.= The trunk of an oak tree.=
This block consists of a couple of loose stones and can't support itself.= This block consists of a couple of loose stones and can't support itself.=
This is a decorative block surrounded by the bark of a tree trunk.= This is a decorative block surrounded by the bark of a tree trunk.=
This is a decorative block.=
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.= This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=
This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.= This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.=
This stone contains pure gold, a rare metal.= This stone contains pure gold, a rare metal.=

View file

@ -4,6 +4,7 @@ mcl_playerplus = {
elytra = {}, elytra = {},
} }
local player_velocity_old = {x=0, y=0, z=0}
local get_connected_players = minetest.get_connected_players local get_connected_players = minetest.get_connected_players
local dir_to_yaw = minetest.dir_to_yaw local dir_to_yaw = minetest.dir_to_yaw
local get_item_group = minetest.get_item_group local get_item_group = minetest.get_item_group
@ -165,6 +166,12 @@ minetest.register_globalstep(function(dtime)
and (fly_node == "air" or fly_node == "ignore") and (fly_node == "air" or fly_node == "ignore")
if elytra.active then if elytra.active then
if player_velocity.x < (player_velocity_old.x - 10) or player_velocity.x > (player_velocity_old.x + 10) then
player:set_hp(player:get_hp() - (math.abs(player_velocity_old.x) * 0.2))
end
if player_velocity.z < (player_velocity_old.z - 10) or player_velocity.z > (player_velocity_old.z + 10) then
player:set_hp(player:get_hp() - (math.abs(player_velocity_old.z) * 0.2))
end
mcl_player.player_set_animation(player, "fly") mcl_player.player_set_animation(player, "fly")
if player_velocity.y < -1.5 then if player_velocity.y < -1.5 then
player:add_velocity({x=0, y=0.17, z=0}) player:add_velocity({x=0, y=0.17, z=0})
@ -218,6 +225,8 @@ minetest.register_globalstep(function(dtime)
player:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90)) player:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
end end
player_velocity_old = player:get_velocity() or player:get_player_velocity()
-- controls right and left arms pitch when shooting a bow -- controls right and left arms pitch when shooting a bow
if string.find(wielded:get_name(), "mcl_bows:bow") and control.RMB and not control.LMB and not control.up and not control.down and not control.left and not control.right then if string.find(wielded:get_name(), "mcl_bows:bow") and control.RMB and not control.LMB and not control.up and not control.down and not control.left and not control.right then
player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35)) player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch+90,-30,pitch * -1 * .35))