aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/tectech/thing/metaTileEntity/single/MTETransformerTT.java
blob: e0c52e64c7530ed99588756c38c9eb9f4959d146 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package tectech.thing.metaTileEntity.single;

import static net.minecraft.util.StatCollector.translateToLocal;

import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.MTETransformer;
import tectech.thing.metaTileEntity.Textures;
import tectech.util.CommonValues;
import tectech.util.TTUtility;

public class MTETransformerTT extends MTETransformer {

    public MTETransformerTT(int aID, String aName, String aNameRegional, int aTier) {
        super(aID, aName, aNameRegional, aTier, "");
        TTUtility.setTier(aTier, this);
    }

    public MTETransformerTT(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
        super(aName, aTier, aDescription, aTextures);
        TTUtility.setTier(aTier, this);
    }

    @Override
    public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
        return new MTETransformerTT(mName, mTier, mDescriptionArray, mTextures);
    }

    @Override
    public ITexture[][][] getTextureSet(ITexture[] aTextures) {
        ITexture[][][] rTextures = new ITexture[12][17][];
        for (byte b = -1; b < 16; b++) {
            rTextures[0][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_MULTI_TT[mTier] };
            rTextures[1][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_MULTI_TT[mTier] };
            rTextures[2][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_MULTI_TT[mTier] };
            rTextures[3][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1] };
            rTextures[4][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1] };
            rTextures[5][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_POWER_TT[mTier + 1] };
            rTextures[6][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_MULTI_TT[mTier] };
            rTextures[7][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_MULTI_TT[mTier] };
            rTextures[8][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_IN_MULTI_TT[mTier] };
            rTextures[9][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1] };
            rTextures[10][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1] };
            rTextures[11][b + 1] = new ITexture[] { Textures.MACHINE_CASINGS_TT[mTier][b + 1],
                Textures.OVERLAYS_ENERGY_OUT_POWER_TT[mTier + 1] };
        }
        return rTextures;
    }

    @Override
    public String[] getDescription() {
        return new String[] {
            translateToLocal("gt.blockmachines.tt.transformer.tier." + (mTier > 9 ? "" : "0") + mTier + ".desc"),
            CommonValues.TEC_MARK_GENERAL };
    }
}