Player api

This commit is contained in:
2026-10-13 22:59:48 -03:00
parent b34e97e487
commit a10b15a3fd
22 changed files with 581 additions and 89 deletions
+3
View File
@@ -46,6 +46,9 @@ export const ATTRIBUTES = {
// blocks a fall can be without hurting
safe_fall_distance: attribute("safe_fall_distance", 3, -1024, 1024),
fall_damage_multiplier: attribute("fall_damage_multiplier", 1, 0, 100),
// how far a player reaches, in blocks from their eyes: blocks they break and use, and entities they hit
block_interaction_range: attribute("block_interaction_range", 6, 0, 64),
entity_interaction_range: attribute("entity_interaction_range", 3, 0, 64),
} satisfies Record<string, AttributeType>;
const BY_ID = new Map<string, AttributeType>(Object.values(ATTRIBUTES).map((type) => [type.id, type]));