1
0
Fork 0

Balance player velocity added knockbacks from catapulting mobs

This commit is contained in:
Eliy21 2023-11-20 14:52:10 +00:00
parent 0fbfe99c1d
commit e0bd5e7f33
1 changed files with 1 additions and 1 deletions

View File

@ -725,7 +725,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
local mob_mag = math.sqrt((v.x * v.x) + (v.z * v.z))
kb = kb + 9 * mcl_enchanting.get_enchantment(wielditem, "knockback")
-- add player velocity to mob knockback
if dir_dot > 0 and mob_mag <= player_mag * 0.8 then
if dir_dot > 0 and mob_mag <= player_mag * 0.625 then
kb = kb + ((math.abs(hv.x) + math.abs(hv.z)) * r)
end
elseif luaentity and luaentity._knockback then