UNPKG

farming-weight

Version:

Tools for calculating farming weight and fortune in Hypixel Skyblock

86 lines (85 loc) 3.15 kB
export declare class SkyBlockTime { static readonly SkyBlockEpochSeconds = 1560275700; static readonly MonthNames: readonly ["Early Spring", "Spring", "Late Spring", "Early Summer", "Summer", "Late Summer", "Early Autumn", "Autumn", "Late Autumn", "Early Winter", "Winter", "Late Winter"]; /** * The year of the SkyBlock time, 1-indexed. */ readonly year: number; /** * The month of the SkyBlock time, 1-indexed. */ readonly month: number; /** * The day of the SkyBlock time, 1-indexed. */ readonly day: number; /** * The Unix timestamp in seconds. */ readonly unixSeconds: number; /** * The Unix timestamp in seconds at the start of the day. */ readonly dayUnixSeconds: number; /** * The day of the SkyBlock year, 1-indexed. */ get dayOfYear(): number; /** * Get the name of the month. */ get monthName(): "Early Spring" | "Spring" | "Late Spring" | "Early Summer" | "Summer" | "Late Summer" | "Early Autumn" | "Autumn" | "Late Autumn" | "Early Winter" | "Winter" | "Late Winter" | undefined; /** * Get a new SkyBlock time object representing the current time. */ static get now(): SkyBlockTime; /** * Create a SkyBlockTime object from a Unix timestamp in milliseconds. * @param unixMs Unix timestamp in milliseconds */ constructor(unixMs: number); /** * Create a SkyBlockTime object from a skyblock year, month, and day. * These dates shouldbe be 1-indexed. For example, Early Spring the 1st of Year 1 is 1, 1, 1. * @param {number} sbYear SkyBlock year * @param {number} sbMonth SkyBlock month * @param {number} sbDay SkyBlock day * @returns {SkyBlockTime} */ static from(sbYear: number, sbMonth?: number, sbDay?: number): SkyBlockTime; /** * Create a SkyBlockTime object from a zero indexed skyblock year, month, and day. * These dates shouldbe be 1-indexed. For example, Early Spring the 1st of Year 1 is 0, 0, 0. * @param {number} sbYear SkyBlock year * @param {number} sbMonth SkyBlock month * @param {number} sbDay SkyBlock day * @returns {SkyBlockTime} */ static fromZeroIndexed(sbYear: number, sbMonth?: number, sbDay?: number): SkyBlockTime; /** * Convert a contest key from a raw Hypixel API response into a SkyBlockTime object. * @param contestKey A contest key in the format '160:6_30:CROP_ID' * @returns {SkyBlockTime} */ static fromContestKey(contestKey: string): SkyBlockTime; isSpring(): boolean; isSummer(): boolean; isAutumn(): boolean; isWinter(): boolean; isHarvestFeast(): boolean; /** * Check if this SkyBlockTime object has a Jacob Contest event. */ hasJacobContest(): boolean; /** * Get a new Date object representing this SkyBlockTime object. */ toDate(): Date; /** * Get the nearest SkyBlockTime date where a Jacob Contest Event happened. * Always rounds down. * @returns {SkyBlockTime} */ getLastContest(): SkyBlockTime; toString(): string; }