Fix crash when opening buffer GUIs

This commit is contained in:
tterrag1098 committed 2015-03-15 22:25:02 -04:00
1 parent 29c60f1d75
commit 1592a1e360
1 file changed
+6 -4
@@ -49,10 +49,12 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
public void initGui() {
super.initGui();
maxInput.setMaxStringLength(10);
maxInput.setText(PowerDisplayUtil.formatPower(getTileEntity().getMaxInput()));
maxOutput.setMaxStringLength(10);
maxOutput.setText(PowerDisplayUtil.formatPower(getTileEntity().getMaxOutput()));
if(getTileEntity().hasPower()) {
maxInput.setMaxStringLength(10);
maxInput.setText(PowerDisplayUtil.formatPower(getTileEntity().getMaxInput()));
maxOutput.setMaxStringLength(10);
maxOutput.setText(PowerDisplayUtil.formatPower(getTileEntity().getMaxOutput()));
}
}
@Override