Fixed warnings and changed zimbie pig texture

This commit is contained in:
WillConker 2024-06-13 17:52:32 +01:00
parent 6d33368858
commit f705571dff
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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)
mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0)