UNPKG

@jsprismarine/prismarine

Version:

Dedicated Minecraft Bedrock Edition server written in TypeScript

61 lines 1.91 kB
import { default as BinaryStream } from '../../../jsbinaryutils/src/index.ts'; export declare const AttributeIds: { Absorption: string; PlayerSaturation: string; PlayerExhaustion: string; KnockbackResistence: string; Health: string; Movement: string; FollowRange: string; PlayerHunger: string; AttackDamage: string; PlayerLevel: string; PlayerExperience: string; UnderwaterMovement: string; Luck: string; FallDamage: string; HorseJumpStrength: string; ZombieSpawnReinforcements: string; LavaMovement: string; }; export declare class Attribute { private readonly name; private readonly min; private readonly max; private readonly default; private readonly value; /** * Class used to store Attribute data. * * @param {object} data - The attribute data. * @param {string} data.name - The name of the attribute. * @param {number} data.min - The minimum value of the attribute. * @param {number} data.max - The maximum value of the attribute. * @param {number} data.def - The default value of the attribute. * @param {number} data.value - The current value of the attribute. */ constructor({ name, min, max, def, value }: { name: string; min: number; max: number; def: number; value: number; }); networkSerialize(stream: BinaryStream): void; static networkDeserialize(stream: BinaryStream): Attribute; getName(): string; getMin(): number; getMax(): number; getDefault(): number; getValue(): number; } export declare class Attributes { private readonly attributes; /** * Returns a list of default attributes to send the first time a player spawns. */ getDefaults(): Attribute[]; getAttributes(): Attribute[]; networkSerialize(): void; } //# sourceMappingURL=Attribute.d.ts.map