ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/util/AssetUtil.java

20 lines
827 B
Java
Raw Normal View History

2015-03-29 15:29:05 +02:00
package ellpeck.actuallyadditions.util;
2015-04-19 01:50:02 +02:00
import net.minecraft.client.gui.FontRenderer;
2015-03-29 15:29:05 +02:00
import net.minecraft.util.ResourceLocation;
2015-04-19 01:50:02 +02:00
import net.minecraft.util.StatCollector;
2015-03-29 15:29:05 +02:00
public class AssetUtil{
public static final ResourceLocation GUI_INVENTORY_LOCATION = getGuiLocation("guiInventory");
public static ResourceLocation getGuiLocation(String file){
return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/" + file + ".png");
}
2015-05-20 22:39:43 +02:00
public static void displayNameString(FontRenderer font, int xSize, int yPositionOfMachineText, String machineName){
2015-04-19 01:50:02 +02:00
String localMachineName = StatCollector.translateToLocal(machineName + ".name");
font.drawString(localMachineName, xSize/2 - font.getStringWidth(localMachineName)/2, yPositionOfMachineText, StringUtil.DECIMAL_COLOR_WHITE);
}
2015-03-29 15:29:05 +02:00
}