Make players mobs too !

This commit is contained in:
2026-09-30 10:42:52 -03:00
parent 65f27d6099
commit 4fbcca6851
23 changed files with 314 additions and 132 deletions
+1 -3
View File
@@ -9,12 +9,10 @@ import { get_sprite_region } from "$/client/sprites.ts";
import type { SpriteRegion } from "$/common/constants.ts";
import { EverythingRegistry } from "$/common/everything_registry.ts";
import type { EntityBoneJson, EntityJson, EntityModelJson } from "$/common/mod_data.ts";
import { push_box, type Vec3 } from "./player_renderer.ts";
import { HURT_TINT, push_box, type Vec3 } from "./player_renderer.ts";
// models are in texture pixels, 16 to a block
const PIXEL = 1 / 16;
// how much of each color is left while it flashes red after being hurt, like minecraft's
const HURT_TINT: Vec3 = [1, 0.6, 0.6];
// the atlas has to be the current texture
export function render_mod_entity(entity: RemoteEntity, camera: Camera, partial_tick: number) {