aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/recipe/metadata/PCBFactoryTierKey.java
blob: 05db919b57afeb49292be894eceb64b8931f9e65 (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
package gregtech.api.recipe.metadata;

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

import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;

import gregtech.api.recipe.RecipeMetadataKey;
import gregtech.api.util.MethodsReturnNonnullByDefault;
import gregtech.nei.RecipeDisplayInfo;

/**
 * Minimum tier required for the PCB factory recipe.
 */
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class PCBFactoryTierKey extends RecipeMetadataKey<Integer> {

    public static final PCBFactoryTierKey INSTANCE = new PCBFactoryTierKey();

    private PCBFactoryTierKey() {
        super(Integer.class, "pcb_factory_tier");
    }

    @Override
    public void drawInfo(RecipeDisplayInfo recipeInfo, @Nullable Object value) {
        int tier = cast(value, 1);
        recipeInfo.drawText(trans("336", "PCB Factory Tier: ") + tier);
    }
}