From f705571dffff986d5bd470e2bc6a653811a0897d Mon Sep 17 00:00:00 2001 From: WillConker Date: Thu, 13 Jun 2024 17:52:32 +0100 Subject: [PATCH] Fixed warnings and changed zimbie pig texture --- mods/ENTITIES/mobs_mc/hoglin+zoglin.lua | 4 ++-- mods/ENTITIES/mobs_mc/piglin.lua | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua index 4714ff31c..29c8bae7a 100644 --- a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua +++ b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua @@ -84,7 +84,7 @@ local hoglin = { else self._zombie_transform_timer = nil end - if self._zombie_transform_timer >= 15 then + if self._zombie_transform_timer and self._zombie_transform_timer >= 15 then local zog = minetest.add_entity(self.object:get_pos(), "mobs_mc:zoglin") zog:set_rotation(self.object:get_rotation()) mcl_potions.give_effect("nausea", zog, 1, 10) @@ -130,7 +130,7 @@ baby_hoglin.do_custom = function(self, dtime) else self._zombie_transform_timer = nil end - if self._zombie_transform_timer >= 15 then + if self._zombie_transform_timer and self._zombie_transform_timer >= 15 then local zog = minetest.add_entity(self.object:get_pos(), "mobs_mc:baby_zoglin") zog:set_rotation(self.object:get_rotation()) mcl_potions.give_effect("nausea", zog, 1, 10) diff --git a/mods/ENTITIES/mobs_mc/piglin.lua b/mods/ENTITIES/mobs_mc/piglin.lua index fb3d575c7..bd9c15971 100644 --- a/mods/ENTITIES/mobs_mc/piglin.lua +++ b/mods/ENTITIES/mobs_mc/piglin.lua @@ -109,7 +109,7 @@ local piglin = { else self._zombie_transform_timer = nil end - if self._zombie_transform_timer >= 15 then + if self._zombie_transform_timer and self._zombie_transform_timer >= 15 then local zog = minetest.add_entity(self.object:get_pos(), "mobs_mc:zombified_piglin") zog:set_rotation(self.object:get_rotation()) mcl_potions.give_effect("nausea", zog, 1, 10) @@ -269,7 +269,7 @@ local zombified_piglin = { textures = { { "blank.png", --baby "default_tool_goldsword.png", --sword - "mobs_mc_zombie_pigman.png", --pigman + "extra_mobs_zombified_piglin.png", --pigman } }, visual_size = {x=3, y=3}, sounds = { @@ -376,7 +376,7 @@ piglin_brute.do_custom = function(self, dtime) else self._zombie_transform_timer = nil end - if self._zombie_transform_timer >= 15 then + if self._zombie_transform_timer and self._zombie_transform_timer >= 15 then local zog = minetest.add_entity(self.object:get_pos(), "mobs_mc:zombified_piglin") zog:set_rotation(self.object:get_rotation()) mcl_potions.give_effect("nausea", zog, 1, 10) @@ -496,4 +496,4 @@ mcl_mobs:non_spawn_specific("mobs_mc:zombified_piglin","overworld",0,minetest.LI mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0) mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0) -mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0) \ No newline at end of file +mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0)