}
@Override
protected void drawSlot(int slot, int x, int y, int mx, int my, float frame) {
GL11.glColor4f(1, 1, 1, 1);
Potion potion = validPotions.get(slot);
PotionEffect effect = getEffect(potion.id);
boolean blank = effect == null;
if (effect == null)
effect = new PotionEffect(potion.id, 1200, 0);
int shade = selectedslot == slot ? 2 : blank ? 1 : 0;
CCRenderState.changeTexture("textures/gui/container/enchanting_table.png");
drawTexturedModalRect(x, y, 0, 166 + getSlotHeight(slot) * shade, width - 30, getSlotHeight(slot));
drawTexturedModalRect(x + width - 30, y, width - 23, 166 + getSlotHeight(slot) * shade, 30, getSlotHeight(slot));
if (potion.hasStatusIcon()) {
CCRenderState.changeTexture("textures/gui/container/inventory.png");
int icon = potion.getStatusIconIndex();
drawTexturedModalRect(x + 1, y + 1, icon % 8 * 18, 198 + icon / 8 * 18, 18, 18);
}
String name = StatCollector.translateToLocal(potion.getName());
String amp = effect.getAmplifier() > 0 ? " " + translateAmplifier(effect.getAmplifier()) : "";
int textColour = shade == 0 ? 0x685e4a : shade == 1 ? 0x407f10 : 0xffff80;
if (fontRenderer.getStringWidth(name + amp) < width - 20) {
fontRenderer.drawString(name + amp, x + 20, y + 1, textColour);
} else {