Java 7 and 8 cleanup

Diamond operator <>
Lambdas and method references
This commit is contained in:
Tom Elfring committed 2017-08-05 17:50:38 +02:00
1 parent 3db03edbc9
commit b72d6efab3
234 files changed
+1614 -2253

No files matched your search

@@ -45,14 +45,11 @@ public class GuiAdvancedElectricMachine extends GuiMekanism
guiElements.add(new GuiSideConfigurationTab(this, tileEntity, tileEntity.guiLocation));
guiElements.add(new GuiTransporterConfigTab(this, 34, tileEntity, tileEntity.guiLocation));
guiElements.add(new GuiPowerBar(this, tileEntity, tileEntity.guiLocation, 164, 15));
guiElements.add(new GuiEnergyInfo(new IInfoHandler() {
@Override
public List<String> getInfo()
{
String multiplier = MekanismUtils.getEnergyDisplay(tileEntity.energyPerTick);
return ListUtils.asList(LangUtils.localize("gui.using") + ": " + multiplier + "/t", LangUtils.localize("gui.needed") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy()-tileEntity.getEnergy()));
}
}, this, tileEntity.guiLocation));
guiElements.add(new GuiEnergyInfo(() ->
{
String multiplier = MekanismUtils.getEnergyDisplay(tileEntity.energyPerTick);
return ListUtils.asList(LangUtils.localize("gui.using") + ": " + multiplier + "/t", LangUtils.localize("gui.needed") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxEnergy()-tileEntity.getEnergy()));
}, this, tileEntity.guiLocation));
guiElements.add(new GuiSlot(SlotType.INPUT, this, tileEntity.guiLocation, 55, 16));
guiElements.add(new GuiSlot(SlotType.POWER, this, tileEntity.guiLocation, 30, 34).with(SlotOverlay.POWER));
@@ -124,4 +121,4 @@ public class GuiAdvancedElectricMachine extends GuiMekanism
mc.renderEngine.bindTexture(MekanismRenderer.getBlocksTexture());
drawTexturedModalRect(guiWidth + xPos, guiHeight + yPos, gas.getGas().getSprite(), sizeX, sizeY);
}
}
}