Merge remote-tracking branch 'origin/master' into enchanted_books_creative

This commit is contained in:
Elias Fleckenstein 2021-01-04 14:23:39 +01:00
commit 7d1ce8bc07
3 changed files with 13 additions and 6 deletions

View File

@ -59,6 +59,15 @@ local boat = {
_animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards _animation = 0, -- 0: not animated; 1: paddling forwards; -1: paddling forwards
} }
local function detach_player(player)
player:set_detach()
player:set_properties({visual_size = {x=1, y=1}})
mcl_player.player_attached[player:get_player_name()] = false
mcl_player.player_set_animation(player, "stand" , 30)
end
minetest.register_on_respawnplayer(detach_player)
function boat.on_rightclick(self, clicker) function boat.on_rightclick(self, clicker)
if not clicker or not clicker:is_player() then if not clicker or not clicker:is_player() then
return return
@ -66,10 +75,7 @@ function boat.on_rightclick(self, clicker)
local name = clicker:get_player_name() local name = clicker:get_player_name()
if self._driver and clicker == self._driver then if self._driver and clicker == self._driver then
self._driver = nil self._driver = nil
clicker:set_detach() detach_player(clicker)
clicker:set_properties({visual_size = {x=1, y=1}})
mcl_player.player_attached[name] = false
mcl_player.player_set_animation(clicker, "stand" , 30)
local pos = clicker:get_pos() local pos = clicker:get_pos()
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
clicker:set_pos(pos) clicker:set_pos(pos)

View File

@ -106,9 +106,10 @@ function mcl_burning.damage(obj)
damage = 1 damage = 1
end end
local new_hp = hp - damage local new_hp = hp - damage
obj:set_hp(new_hp)
if health then if health then
luaentity.health = new_hp luaentity.health = new_hp
else
obj:set_hp(new_hp)
end end
end end
end end

View File

@ -1028,7 +1028,7 @@ for i=1,8 do
drop = "mcl_throwing:snowball "..(i+1), drop = "mcl_throwing:snowball "..(i+1),
_mcl_blast_resistance = 0.1, _mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1, _mcl_hardness = 0.1,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)},
}) })
end end