Fix magma cubes and zombies not taking damage from hands; and adjust magma cube armors to their proper values.

This commit is contained in:
MysticTempest 2020-12-17 16:07:20 -06:00
parent fb51ab05ea
commit cb3fa6cd09
2 changed files with 6 additions and 6 deletions

@ -2964,8 +2964,8 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
local die = false
-- only play hit sound and show blood effects if damage is 1 or over
if damage >= 1 then
-- only play hit sound and show blood effects if damage is 1 or over; lower to 0.1 to ensure armor works appropriately.
if damage >= 0.1 then
-- weapon sounds
if weapon:get_definition().sounds ~= nil then
@ -2986,7 +2986,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
damage_effect(self, damage)
-- do damage
self.health = self.health - floor(damage)
self.health = self.health - damage
-- skip future functions if dead, except alerting others
if check_for_death(self, "hit", {type = "punch", puncher = hitter}) then

@ -185,7 +185,7 @@ local magma_cube_big = {
run_velocity = 4,
damage = 6,
reach = 3,
armor = 40,
armor = 53,
drops = {
{name = mobs_mc.items.magma_cream,
chance = 4,
@ -240,7 +240,7 @@ magma_cube_small.run_velocity = 2.6
magma_cube_small.jump_height = 6
magma_cube_small.damage = 4
magma_cube_small.reach = 2.75
magma_cube_small.armor = 70
magma_cube_small.armor = 66
magma_cube_small.spawn_small_alternative = "mobs_mc:magma_cube_tiny"
magma_cube_small.on_die = spawn_children_on_die("mobs_mc:magma_cube_tiny", 4, 0.6, 1.0)
mobs:register_mob("mobs_mc:magma_cube_small", magma_cube_small)
@ -260,7 +260,7 @@ magma_cube_tiny.run_velocity = 1.02
magma_cube_tiny.jump_height = 4
magma_cube_tiny.damage = 3
magma_cube_tiny.reach = 2.5
magma_cube_tiny.armor = 85
magma_cube_tiny.armor = 50
magma_cube_tiny.drops = {}
magma_cube_tiny.spawn_small_alternative = nil
magma_cube_tiny.on_die = nil