mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Fix zombie villager curing (crash)
This commit is contained in:
parent
1262216f9d
commit
86651e7557
1 changed files with 1 additions and 14 deletions
|
@ -119,20 +119,7 @@ mcl_mobs:register_mob("mobs_mc:villager_zombie", {
|
||||||
villager_obj:set_yaw(yaw)
|
villager_obj:set_yaw(yaw)
|
||||||
villager.target_yaw = yaw
|
villager.target_yaw = yaw
|
||||||
villager.nametag = self.nametag
|
villager.nametag = self.nametag
|
||||||
local texture = self.base_texture[1]:gsub("zombie", "villager")
|
villager._profession = "unemployed"
|
||||||
if texture == "mobs_mc_villager_villager.png" then
|
|
||||||
texture = "mobs_mc_villager.png"
|
|
||||||
end
|
|
||||||
local textures = {texture}
|
|
||||||
villager.base_texture = textures
|
|
||||||
villager_obj:set_properties({textures = textures})
|
|
||||||
local matches = {}
|
|
||||||
for prof, tex in pairs(professions) do
|
|
||||||
if texture == tex then
|
|
||||||
table.insert(matches, prof)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
villager._profession = matches[math.random(#matches)]
|
|
||||||
self._curing = nil
|
self._curing = nil
|
||||||
mcl_burning.extinguish(obj)
|
mcl_burning.extinguish(obj)
|
||||||
obj:remove()
|
obj:remove()
|
||||||
|
|
Loading…
Reference in a new issue