aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/nei/formatter/DefaultSpecialValueFormatter.java
blob: 1c4d486319005ea40b59cc7e328a454a046fef97 (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
30
31
32
33
34
35
36
package gregtech.nei.formatter;

import static gregtech.api.util.GT_Utility.trans;

import java.util.Collections;
import java.util.List;

import javax.annotation.ParametersAreNonnullByDefault;

import gregtech.GT_Mod;
import gregtech.api.util.MethodsReturnNonnullByDefault;
import gregtech.nei.RecipeDisplayInfo;

@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class DefaultSpecialValueFormatter implements INEISpecialInfoFormatter {

    public static DefaultSpecialValueFormatter INSTANCE = new DefaultSpecialValueFormatter();

    @Override
    public List<String> format(RecipeDisplayInfo recipeInfo) {
        int specialValue = recipeInfo.recipe.mSpecialValue;
        if (specialValue == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) {
            return Collections.singletonList(trans("159", "Needs Low Gravity"));
        } else if (specialValue == -200 && GT_Mod.gregtechproxy.mEnableCleanroom) {
            return Collections.singletonList(trans("160", "Needs Cleanroom"));
        } else if (specialValue == -201) {
            return Collections.singletonList(trans("206", "Scan for Assembly Line"));
        } else if (specialValue == -300 && GT_Mod.gregtechproxy.mEnableCleanroom) {
            return Collections.singletonList(trans("160.1", "Needs Cleanroom & LowGrav"));
        } else if (specialValue == -400) {
            return Collections.singletonList(trans("216", "Deprecated Recipe"));
        }
        return Collections.emptyList();
    }
}