blob: 9c3c9ed219a6ce8490c2a3963e54bb52c69e4b78 (
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
29
|
package gregtech.api.interfaces;
/**
* To get a tooltip with a secondary description
*/
public interface ISecondaryDescribable extends IDescribable {
/**
* Convenient to call when overriding the `String[] getDescription()` method.
*/
default String[] getCurrentDescription() {
if (isDisplaySecondaryDescription() && getSecondaryDescription() != null) {
return getSecondaryDescription();
}
return getPrimaryDescription();
}
String[] getPrimaryDescription();
String[] getSecondaryDescription();
/**
* This method will only be called on client side
*
* @return whether the secondary description should be display. default is false
*/
default boolean isDisplaySecondaryDescription() {
return false;
}
}
|