Add natural mob spawning for rotwalker

This commit is contained in:
2026-09-30 22:15:42 -03:00
parent 0052faa24d
commit a6fd508529
22 changed files with 714 additions and 7 deletions
+5 -1
View File
@@ -15,7 +15,7 @@ import {
RandomLookAroundGoal,
RandomStrollGoal,
} from "./goals.ts";
import { Mob } from "./mob.ts";
import { Mob, type MobCategory } from "./mob.ts";
// the entity's class. the attributes are read while LivingEntity is being built, before any field of a subclass is
// set, so each kind gets its own class that has its json already
@@ -32,6 +32,10 @@ export function mod_entity_factory(json: EntityJson): EntityFactory {
override height = json.height;
override eye_height = json.height * 0.85;
override get category(): MobCategory {
return monster ? "monster" : "creature";
}
override default_attributes(): [AttributeType, number?][] {
return [
...super.default_attributes(),