import { Inputs } from "../game/Inputs"; import { ZSTeleportPlayer } from "../packets"; import { ComplexBlockBehavior } from "../tiles/register"; import { ZHeap, ZKeyKind, ZRole, ZSwitchId } from "../types"; import { Vector } from "./Vector"; export interface CheapPlayer { id: number; role: ZRole; username: string; canGod: boolean; } export declare class Player { readonly id: number; readonly name: string; role: ZRole; readonly isGuest: boolean; canGod: boolean; input: Inputs; get sfgPosition(): Vector; get hasEdit(): boolean; constructor(id: number, name: string, role: ZRole, isGuest: boolean, position: Vector, canGod: boolean, inGod: boolean); cheap(): CheapPlayer; handleTeleport(event: ZSTeleportPlayer): void; /** @version eephysics This may be removed when the physics engine changes */ get worldPosition(): Vector; set worldPosition(v: Vector); /** @version eephysics This may be removed when the physics engine changes */ lastBlockIn: Vector; /** @version eephysics This may be removed when the physics engine changes */ lastNear: [Vector, ComplexBlockBehavior, number, ZHeap][]; /** @version eephysics This may be removed when the physics engine changes */ private inGodMode; /** @version eephysics This may be removed when the physics engine changes */ get isInGodMode(): boolean; /** @version eephysics This may be removed when the physics engine changes */ set isInGodMode(flag: boolean); /** @version eephysics This may be removed when the physics engine changes */ toggleGodMode(): void; /** @version eephysics This may be removed when the physics engine changes */ horizontal: number; /** @version eephysics This may be removed when the physics engine changes */ vertical: number; /** @version eephysics This may be removed when the physics engine changes */ isSpaceDown: boolean; /** @version eephysics This may be removed when the physics engine changes */ isSpaceJustPressed: boolean; /** @version eephysics This may be removed when the physics engine changes */ speedMult: number; /** @version eephysics This may be removed when the physics engine changes */ gravityMult: number; /** @version eephysics This may be removed when the physics engine changes */ velocity: Vector; /** @version eephysics This may be removed when the physics engine changes */ position: Vector; /** @version eephysics This may be removed when the physics engine changes */ ticks: number; /** @version eephysics This may be removed when the physics engine changes */ lastJump: number; /** @version eephysics This may be removed when the physics engine changes */ jumpCount: number; /** @version eephysics This may be removed when the physics engine changes */ get x(): number; /** @version eephysics This may be removed when the physics engine changes */ set x(x: number); /** @version eephysics This may be removed when the physics engine changes */ get y(): number; /** @version eephysics This may be removed when the physics engine changes */ set y(y: number); /** @version eephysics This may be removed when the physics engine changes */ jumpTimes: "none" | "once" | "many"; /** @version eephysics This may be removed when the physics engine changes */ maxJumps: number; /** @version eephysics This may be removed when the physics engine changes */ jumpMult: number; /** @version eephysics This may be removed when the physics engine changes */ queue: [number, number]; /** @version eephysics This may be removed when the physics engine changes */ get center(): Vector; /** @version eephysics This may be removed when the physics engine changes */ insideSign: false | Vector; /** @version eephysics This may be removed when the physics engine changes */ deathTick: number; /** @version eephysics This may be removed when the physics engine changes */ get isDead(): boolean; /** @version eephysics This may be removed when the physics engine changes */ set isDead(value: boolean); /** @version eephysics This may be removed when the physics engine changes */ kill(): void; /** * Revives the player at a certain position (in block coordinates) * @version eephysics This may be removed when the physics engine changes */ revive(at?: Vector): void; shouldBeRevived(ticksAfterDeath: number): boolean; /** @version eephysics This may be removed when the physics engine changes */ checkpoint: Vector | null; /** @version eephysics This may be removed when the physics engine changes */ get hasCheckpoint(): boolean; /** @version eephysics This may be removed when the physics engine changes */ clearCheckpoint(): void; /** @version eephysics This may be removed when the physics engine changes */ keys: PlayerKeys; /** @version eephysics This may be removed when the physics engine changes */ switches: Switches; } declare class PlayerKeys { state: Partial>; numIn: Partial>; clear(): void; removeCollision(key: ZKeyKind): void; setCollision(key: ZKeyKind, on: boolean): void; getCollision(key: ZKeyKind): boolean | undefined; setCountIn(key: ZKeyKind, countIn: number): void; getCountIn(key: ZKeyKind): number; } declare class Switches { activated: Set; state: Map; near: Map; clear(): void; removeCollision(key: ZSwitchId): void; setCollision(key: ZSwitchId, on: boolean): void; getCollision(key: ZSwitchId): boolean | undefined; setCountIn(key: ZSwitchId, countIn: number): void; getCountIn(key: ZSwitchId): number; isOn(switchId: ZSwitchId): boolean; toggle(switchId: ZSwitchId, state: boolean): void; } export {};