From d7253e8b3bb93e2e44516ba79696d94b0b0cca73 Mon Sep 17 00:00:00 2001 From: Johannes Fritz Date: Tue, 30 Aug 2022 07:42:03 -0500 Subject: [PATCH] Remove saved visual_size --- mods/ENTITIES/mobs_mc/zombie.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/zombie.lua b/mods/ENTITIES/mobs_mc/zombie.lua index 46070500e9..4bb77e5f9a 100644 --- a/mods/ENTITIES/mobs_mc/zombie.lua +++ b/mods/ENTITIES/mobs_mc/zombie.lua @@ -94,6 +94,13 @@ local zombie = { view_range = 16, attack_type = "dogfight", harmed_by_heal = true, + on_spawn = function(self) + -- Remove saved visual_size on old existing entites. + -- Old entities were 3 now it's 1. + self.visual_size = nil + self.object:set_properties({visual_size = self.visual_size}) + self.base_size = self.visual_size + end, } mcl_mobs:register_mob("mobs_mc:zombie", zombie)