Java Code Examples for gregtech.api.enums.Materials#values()

The following examples show how to use gregtech.api.enums.Materials#values() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BWGTMetaItems.java    From bartworks with MIT License 5 votes vote down vote up
@Override
public IIconContainer getIconContainer(int aMetaData) {
    if (this.orePrefixes.mTextureIndex == -1)
        return getIconContainerBartWorks(aMetaData);
    if (aMetaData > 1000 && hasList)
        return NoMetaValue.get(aMetaData-1001).mIconSet.mTextures[this.orePrefixes.mTextureIndex];
    if (aMetaData < 0 || aMetaData > Materials.values().length || Materials.values()[(short) aMetaData] == null)
        return null;
    return Materials.values()[(short) aMetaData].mIconSet.mTextures[this.orePrefixes.mTextureIndex];
}
 
Example 2
Source File: BWGTMetaItems.java    From bartworks with MIT License 4 votes vote down vote up
@Override
public short[] getColorForGUI(ItemStack aStack) {
    if (aStack.getItemDamage() > 1000 && hasList)
        return NoMetaValue.get(aStack.getItemDamage()-1001).mRGBa;
    return Materials.values()[aStack.getItemDamage()].mRGBa;
}
 
Example 3
Source File: BWGTMetaItems.java    From bartworks with MIT License 4 votes vote down vote up
@Override
public String getNameForGUI(ItemStack aStack) {
    if (aStack.getItemDamage() > 1000 && hasList)
        return NoMetaValue.get(aStack.getItemDamage()-1001).mDefaultLocalName;
    return Materials.values()[aStack.getItemDamage()].mDefaultLocalName;
}
 
Example 4
Source File: BWGTMetaItems.java    From bartworks with MIT License 4 votes vote down vote up
@Override
public short[] getRGBa(ItemStack aStack) {
    if (aStack.getItemDamage() > 1000 && hasList)
        return NoMetaValue.get(aStack.getItemDamage()-1001).mRGBa;
    return Materials.values()[aStack.getItemDamage()].mRGBa;
}