Messy but working chicken
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import type { EntityData, EntityInfo } from "$/common/protocol.ts";
|
||||
import type { EntityJson } from "$/common/mod_data.ts";
|
||||
import { EverythingRegistry } from "$/common/everything_registry.ts";
|
||||
import type { ClientLevel } from "../level/client_level.ts";
|
||||
import { Entity } from "./entity.ts";
|
||||
|
||||
@@ -27,7 +29,9 @@ export class RemoteEntity extends Entity {
|
||||
#lerp_ticks = 0;
|
||||
|
||||
constructor(level: ClientLevel, info: Extract<EntityInfo, { kind: "entity" }>) {
|
||||
super(level, info.id, 0.6, 1.8, 1.62);
|
||||
// the size of mods' entities, player sized for kinds the client doesn't know
|
||||
const json = EverythingRegistry.get<EntityJson>("entities", info.type);
|
||||
super(level, info.id, json?.width ?? 0.6, json?.height ?? 1.8, json ? json.height * 0.85 : 1.62);
|
||||
this.type = info.type;
|
||||
this.data = info.data;
|
||||
this.set_position(info.x, info.y, info.z);
|
||||
|
||||
Reference in New Issue
Block a user