1
0
Fork 0

Reduce Hoglin/Zoglin knockbacks when guarding

This commit is contained in:
Eliy21 2024-01-26 16:14:27 +00:00
parent eca31c2fe3
commit ff049eb321
1 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,11 @@ local hoglin = {
floats = 0, floats = 0,
custom_attack = function(self) custom_attack = function(self)
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
self.attack:add_velocity({x=0,y=13,z=0}) if self.attack:is_player() and mcl_shields and mcl_shields.is_blocking and mcl_shields.is_blocking(self.attack) then
self.attack:add_velocity({x=0,y=9.75,z=0})
else
self.attack:add_velocity({x=0,y=13,z=0})
end
self.attack:punch(self.object, 1.0, { self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage} damage_groups = {fleshy = self.damage}