1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2026-01-02 19:45:20 +01:00

dont attack if dead or running away

This commit is contained in:
tenplus1
2025-12-31 17:51:26 +00:00
parent 92cbeaba55
commit 9e9523a1a5

View File

@@ -18,7 +18,7 @@ end
-- global table
mobs = {
mod = "redo", version = "20251205",
mod = "redo", version = "20251231",
spawning_mobs = {}, translate = S,
node_snow = has(core.registered_aliases["mapgen_snow"])
or has("mcl_core:snow") or has("default:snow") or "air",
@@ -213,7 +213,8 @@ end
function mob_class:do_attack(player, force)
if self.state == "attack" and not force then return end
if (self.state == "attack" or self.state == "die" or self.state == "runaway")
and not force then return end
self.attack = player ; self.state = "attack"