mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-07-22 18:10:30 +02:00
report error if self.texture_mods is not a string
This commit is contained in:
7
api.lua
7
api.lua
@ -18,7 +18,7 @@ end
|
|||||||
-- global table
|
-- global table
|
||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo", version = "20250603",
|
mod = "redo", version = "20250721",
|
||||||
spawning_mobs = {}, translate = S,
|
spawning_mobs = {}, translate = S,
|
||||||
node_snow = has(core.registered_aliases["mapgen_snow"])
|
node_snow = has(core.registered_aliases["mapgen_snow"])
|
||||||
or has("mcl_core:snow") or has("default:snow") or "air",
|
or has("mcl_core:snow") or has("default:snow") or "air",
|
||||||
@ -2943,6 +2943,11 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
|||||||
self:set_animation("stand")
|
self:set_animation("stand")
|
||||||
|
|
||||||
-- apply texture mods
|
-- apply texture mods
|
||||||
|
if type(self.texture_mods) ~= "string" then
|
||||||
|
print("[Mobs Redo API] Error: self.texture_mods not a string")
|
||||||
|
self.texture_mods = ""
|
||||||
|
end
|
||||||
|
|
||||||
self.object:set_texture_mod(self.texture_mods)
|
self.object:set_texture_mod(self.texture_mods)
|
||||||
|
|
||||||
-- set 5.x flag to remove monsters when map area unloaded
|
-- set 5.x flag to remove monsters when map area unloaded
|
||||||
|
Reference in New Issue
Block a user