Add natural mob spawning for rotwalker
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user