Physical and arcane damage
This commit is contained in:
+4
-1
@@ -98,6 +98,9 @@ export interface EntityJson {
|
||||
max_health?: number;
|
||||
// minecraft's per tick speed, 0.25 for most animals
|
||||
movement_speed?: number;
|
||||
// protection from physical and from arcane damage, not used yet
|
||||
physical_shielding?: number;
|
||||
arcane_shielding?: number;
|
||||
}
|
||||
|
||||
type Vec3 = [number, number, number];
|
||||
@@ -678,7 +681,7 @@ export function validate_entity(json: unknown): Problems {
|
||||
problems.push(`${key} must be a number of blocks above 0, at most 16`);
|
||||
}
|
||||
}
|
||||
for (const key of ["max_health", "movement_speed"]) {
|
||||
for (const key of ["max_health", "movement_speed", "physical_shielding", "arcane_shielding"]) {
|
||||
if (json[key] !== undefined && (typeof json[key] !== "number" || json[key] < 0)) {
|
||||
problems.push(`${key} must be a number, 0 or more`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user