Undergarden mod !
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import { CHUNK_SIZE } from "$/common/constants.ts";
|
||||
import { is_within_view } from "$/common/chunk_streaming.ts";
|
||||
import type { ItemStack } from "$/common/inventory.ts";
|
||||
import type { EntityInfo, ServerMessage } from "$/common/protocol.ts";
|
||||
import type { EntityEvent, EntityInfo, ServerMessage } from "$/common/protocol.ts";
|
||||
import type { ServerPlayer } from "../player.ts";
|
||||
import type { ServerWorld } from "../world.ts";
|
||||
import type { DamageSource, Entity, EntityLevel, SavedEntity } from "./entity.ts";
|
||||
@@ -131,7 +131,7 @@ export class EntityManager implements EntityLevel {
|
||||
}
|
||||
|
||||
// players aren't tracked like entities, everyone else knows about them
|
||||
entity_event(entity: Entity, event: "hurt" | "death") {
|
||||
entity_event(entity: Entity, event: EntityEvent) {
|
||||
const is_player = this.#host.players().includes(entity as ServerPlayer);
|
||||
for (const [player, tracked] of this.#tracked) {
|
||||
if (is_player ? player !== entity : tracked.has(entity.id)) {
|
||||
|
||||
Reference in New Issue
Block a user