1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00
CC-Tweaked/projects/core/src/main/java/dan200/computercraft/core/computer/ComputerEnvironment.java

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Java
Raw Normal View History

/*
* This file is part of ComputerCraft - http://www.computercraft.info
* Copyright Daniel Ratcliffe, 2011-2022. Do not distribute without permission.
* Send enquiries to dratcliffe@gmail.com
*/
package dan200.computercraft.core.computer;
import dan200.computercraft.api.filesystem.WritableMount;
import dan200.computercraft.core.filesystem.WritableFileMount;
import dan200.computercraft.core.metrics.MetricsObserver;
import javax.annotation.Nullable;
public interface ComputerEnvironment {
/**
* Get the current in-game day.
*
* @return The current day.
*/
int getDay();
/**
* Get the current in-game time of day.
*
* @return The current time.
*/
double getTimeOfDay();
/**
* Get the {@link MetricsObserver} for this computer. This should be constant for the duration of this
* {@link ComputerEnvironment}.
*
* @return This computer's {@link MetricsObserver}.
*/
MetricsObserver getMetrics();
/**
* Construct the mount for this computer's user-writable data.
*
* @return The constructed mount or {@code null} if the mount could not be created.
* @see WritableFileMount
*/
@Nullable
WritableMount createRootMount();
}