Struct PluginWorldTimeSnapshot
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
The in-world date and time of day, as the client's server-synchronized world clock reports it. A world day is much shorter than a real day: sixteen world hours pass in a little over two real hours.
public readonly record struct PluginWorldTimeSnapshot : IEquatable<PluginWorldTimeSnapshot>
- Implements
- Inherited Members
Constructors
PluginWorldTimeSnapshot(bool, double, int, int, int, int, string, string, bool, double, double)
The in-world date and time of day, as the client's server-synchronized world clock reports it. A world day is much shorter than a real day: sixteen world hours pass in a little over two real hours.
public PluginWorldTimeSnapshot(bool IsAvailable, double GameTicks, int Year, int Month, int Day, int Hour, string MonthName, string HourName, bool IsDay, double MinutesUntilDay, double MinutesUntilNight)
Parameters
IsAvailableboolTrue when a session is in the world and the remaining fields carry real values. When it is false every other field is at its default.
GameTicksdoubleThe world clock in seconds since the calendar's origin, including the calendar offset the server supplied.
YearintThe world year.
MonthintThe month number within the year, starting at zero.
DayintThe day number within the month, starting at one.
HourintThe hour of the world day, from 0 to 15; there are sixteen named hours in a world day rather than twenty-four.
MonthNamestringThe month's display name.
HourNamestringThe hour's display name.
IsDayboolTrue during daylight, which runs from hour 4 up to but not including hour 12.
MinutesUntilDaydoubleReal-time minutes until daylight begins, or zero when it is already day.
MinutesUntilNightdoubleReal-time minutes until night falls, or zero when it is already night.
Properties
Day
The day number within the month, starting at one.
public int Day { get; init; }
Property Value
GameTicks
The world clock in seconds since the calendar's origin, including the calendar offset the server supplied.
public double GameTicks { get; init; }
Property Value
Hour
The hour of the world day, from 0 to 15; there are sixteen named hours in a world day rather than twenty-four.
public int Hour { get; init; }
Property Value
HourName
The hour's display name.
public string HourName { get; init; }
Property Value
IsAvailable
True when a session is in the world and the remaining fields carry real values. When it is false every other field is at its default.
public bool IsAvailable { get; init; }
Property Value
IsDay
True during daylight, which runs from hour 4 up to but not including hour 12.
public bool IsDay { get; init; }
Property Value
MinutesUntilDay
Real-time minutes until daylight begins, or zero when it is already day.
public double MinutesUntilDay { get; init; }
Property Value
MinutesUntilNight
Real-time minutes until night falls, or zero when it is already night.
public double MinutesUntilNight { get; init; }
Property Value
Month
The month number within the year, starting at zero.
public int Month { get; init; }
Property Value
MonthName
The month's display name.
public string MonthName { get; init; }
Property Value
Year
The world year.
public int Year { get; init; }