aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces/metatileentity/IMetricsExporter.java
blob: f97cd79ed66c7f46143d2275b1153a1038bd789c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package gregtech.api.interfaces.metatileentity;

import java.util.List;

import org.jetbrains.annotations.NotNull;

import gregtech.api.metatileentity.BaseMetaTileEntity;

/**
 * Metrics Transmitter covers look for this interface for retrieving custom metrics for a machine. If this interface is
 * not present on the machine housing the cover, it will use {@link BaseMetaTileEntity#getInfoData()} to retrieve info
 * instead.
 */
public interface IMetricsExporter {

    /**
     * Attached metrics covers will call this method to receive reported metrics.
     * <p>
     * When reporting metrics, try to keep the number of entries small, and ordering of entries consistent. Advanced
     * Sensor Cards allow the user to selectively turn off individual lines using the panel's UI, and doing so is
     * aggravated by a metrics set that is inconsistent and/or large.
     *
     * @return A list of strings to print on the information panel the advanced sensor card is utilizing. Each item in
     *         the list will be printed on its own line.
     */
    @NotNull
    List<String> reportMetrics();
}