Calendar Bindings

Bindings for using and retrieving TFC’s calendar system

declare class CalendarBindings {

    // These can be accessed via TFC.calendar.*

    HOURS_IN_DAY: int // 24
    MONTHS_IN_YEAR: int // 12
    CALENDAR_TICKS_IN_HOUR: int // 1000
    CALENDAR_TICKS_IN_DAY: int // 24000

    getCalendar(): ICalendar
    getCalendar(level: LevelReader): ICalendar
    getCalendar(isClient: boolean): ICalendar
    getCalendar(entity: Entity): ICalendar
    getCalendar(be: BlockEntity): ICalendar
    
    getTimeAndDate(calendarTick: int, daysInMonth: int): MutableComponent
    getDayTime(calendarTick: int): MutableComponent
    getTimeDelta(calendarTicks: int, daysInMonth: int): MutableComponent

    getTotalCalendarDays(calendarTick: int): int

    getMonthOfYear(calendarTick: int, daysInMonth: int): Month
}
  • : Gets the server or client ICalendar from the given object
  • : Creates a formatted text object that describes the given calendar tick’s date and time in HH:MM month DD, YYY format
  • : Creates a formatted text object that describes the calendar tick in HH:MM form
  • : Creates a formatted text object describing the amount of time the calendar ticks value represents
  • : Returns the number of calendar days which have passed since the start of the world at the given calendar tick
  • : Gets the month at the given calendar tick