/** Adds the buttons (and other controls) to the screen in question. */ @Override public void initGui() { super.initGui(); this.textFieldFrequency = new GuiTextField(fontRenderer, 80, 50, 40, 12); this.textFieldFrequency.setMaxStringLength(4); if (itemStack != null) { this.textFieldFrequency.setText( ((IItemFrequency) this.itemStack.getItem()).getFrequency(this.itemStack) + ""); } }