1
0
Fork 0

Fix enderman crashing

This commit is contained in:
jordan4ibanez 2021-04-24 18:06:24 -04:00
parent 81713a342d
commit 3e9bbca914
1 changed files with 2 additions and 2 deletions

View File

@ -435,7 +435,7 @@ mobs:register_mob("mobs_mc:enderman", {
self.base_texture = create_enderman_textures(block_type, self._taken_node) self.base_texture = create_enderman_textures(block_type, self._taken_node)
self.object:set_properties({ textures = self.base_texture }) self.object:set_properties({ textures = self.base_texture })
self.animation = select_enderman_animation("block") self.animation = select_enderman_animation("block")
mobs:set_animation(self, self.animation.current) mobs.set_mob_animation(self, self.animation.current)
if def.sounds and def.sounds.dug then if def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {pos = take_pos, max_hear_distance = 16}, true) minetest.sound_play(def.sounds.dug, {pos = take_pos, max_hear_distance = 16}, true)
end end
@ -458,7 +458,7 @@ mobs:register_mob("mobs_mc:enderman", {
local def = minetest.registered_nodes[self._taken_node] local def = minetest.registered_nodes[self._taken_node]
-- Update animation accordingly (removes visible block) -- Update animation accordingly (removes visible block)
self.animation = select_enderman_animation("normal") self.animation = select_enderman_animation("normal")
mobs:set_animation(self, self.animation.current) mobs.set_mob_animation(self, self.animation.current)
if def.sounds and def.sounds.place then if def.sounds and def.sounds.place then
minetest.sound_play(def.sounds.place, {pos = place_pos, max_hear_distance = 16}, true) minetest.sound_play(def.sounds.place, {pos = place_pos, max_hear_distance = 16}, true)
end end