// Path: src/main/java/net/nickac/lithium/frontend/mod/utils/MiscUtils.java
// public class MiscUtils {
// 	public static String stringToStars(String input) {
// 		char[] ca = new char[input.length()];
// 		Arrays.fill(ca, '*');
// 		return new String(ca);
// 	}
// 
// 	public static boolean isCenteredX(LControl c) {
// 		return c.getCentered() != LControl.CenterOptions.NONE && c.getCentered() != LControl.CenterOptions.VERTICAL;
// 	}
// 
// 	public static boolean isCenteredY(LControl c) {
// 		return c.getCentered() != LControl.CenterOptions.NONE && c.getCentered() != LControl.CenterOptions.HORIZONTAL;
// 	}
// 
// 	public static int ConvertRange(int originalStart, int originalEnd, int newStart, int newEnd, int value) {
// 		double scale = (double) (newEnd - newStart) / (originalEnd - originalStart);
// 		return (int) (newStart + ((value - originalStart) * scale));
// 	}
// 
// 	public static String getURLFileExt(String url) {
// 		if (url.contains(".")) {
// 			return url.substring(url.lastIndexOf("."));
// 		}
// 		return "";
// 
// 	}
// }


import net.minecraft.client.gui.GuiPageButtonList;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ChatAllowedCharacters;
import net.minecraft.util.math.MathHelper;
import net.nickac.lithium.frontend.mod.utils.MiscUtils;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
			boolean flag2 = this.cursorPosition < this.text.length() || this.text.length() >= this.getMaxStringLength();
			int k1 = j1;

			if (!flag) {
				k1 = j > 0 ? l + this.width : l;
			} else if (flag2) {
				k1 = j1 - 1;
				--j1;
			}

			if (!s.isEmpty() && flag && j < s.length()) {
				j1 = drawExtendedStringWithShadow(i, j1, i1, s.substring(j));
			}

			if (flag1) {
				if (flag2) {
					Gui.drawRect(k1, i1 - 1, k1 + 1, i1 + 1 + this.fontRenderer.FONT_HEIGHT, -3092272);
				} else {
					this.fontRenderer.drawStringWithShadow("_", (float) k1, (float) i1, i);
				}
			}

			if (k != j) {
				int l1 = l + this.fontRenderer.getStringWidth(s.substring(0, k));
				this.drawSelectionBox(k1, i1 - 1, l1 - 1, i1 + 1 + this.fontRenderer.FONT_HEIGHT);
			}
		}
	}

	private int drawExtendedStringWithShadow(int i, float l, float i1, String s1) {
// Path: src/main/java/net/nickac/lithium/frontend/mod/utils/MiscUtils.java
// public class MiscUtils {
// 	public static String stringToStars(String input) {
// 		char[] ca = new char[input.length()];
// 		Arrays.fill(ca, '*');
// 		return new String(ca);
// 	}
// 
// 	public static boolean isCenteredX(LControl c) {
// 		return c.getCentered() != LControl.CenterOptions.NONE && c.getCentered() != LControl.CenterOptions.VERTICAL;
// 	}
// 
// 	public static boolean isCenteredY(LControl c) {
// 		return c.getCentered() != LControl.CenterOptions.NONE && c.getCentered() != LControl.CenterOptions.HORIZONTAL;
// 	}
// 
// 	public static int ConvertRange(int originalStart, int originalEnd, int newStart, int newEnd, int value) {
// 		double scale = (double) (newEnd - newStart) / (originalEnd - originalStart);
// 		return (int) (newStart + ((value - originalStart) * scale));
// 	}
// 
// 	public static String getURLFileExt(String url) {
// 		if (url.contains(".")) {
// 			return url.substring(url.lastIndexOf("."));
// 		}
// 		return "";
// 
// 	}
// }


// Path: src/main/java/net/nickac/lithium/frontend/mod/ui/NickGuiTextField.java
import net.minecraft.client.gui.GuiPageButtonList;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.util.ChatAllowedCharacters;
import net.minecraft.util.math.MathHelper;
import net.nickac.lithium.frontend.mod.utils.MiscUtils;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;

			boolean flag2 = this.cursorPosition < this.text.length() || this.text.length() >= this.getMaxStringLength();
			int k1 = j1;

			if (!flag) {
				k1 = j > 0 ? l + this.width : l;
			} else if (flag2) {
				k1 = j1 - 1;
				--j1;
			}

			if (!s.isEmpty() && flag && j < s.length()) {
				j1 = drawExtendedStringWithShadow(i, j1, i1, s.substring(j));
			}

			if (flag1) {
				if (flag2) {
					Gui.drawRect(k1, i1 - 1, k1 + 1, i1 + 1 + this.fontRenderer.FONT_HEIGHT, -3092272);
				} else {
					this.fontRenderer.drawStringWithShadow("_", (float) k1, (float) i1, i);
				}
			}

			if (k != j) {
				int l1 = l + this.fontRenderer.getStringWidth(s.substring(0, k));
				this.drawSelectionBox(k1, i1 - 1, l1 - 1, i1 + 1 + this.fontRenderer.FONT_HEIGHT);
			}
		}
	}

	private int drawExtendedStringWithShadow(int i, float l, float i1, String s1) {
		return this.fontRenderer.drawStringWithShadow(password ? MiscUtils.stringToStars(s1) : s1, l, i1, i);