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

19 lines
773 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;
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){
String localMachineName = StringUtil.localize(machineName+".name");
2015-04-19 01:50:02 +02:00
font.drawString(localMachineName, xSize/2 - font.getStringWidth(localMachineName)/2, yPositionOfMachineText, StringUtil.DECIMAL_COLOR_WHITE);
}
2015-03-29 15:29:05 +02:00
}