Minor cleanup

This commit is contained in:
pupnewfster committed 2019-07-08 11:45:20 -04:00
1 parent 01f52b762f
commit 5f899cdbfe
13 files changed
+19 -28

No files matched your search

@@ -67,18 +67,18 @@ public class GuiTransporterConfig extends GuiMekanismTile<TileEntityContainerBlo
} else {
drawTexturedModalRect(guiWidth + 156, guiHeight + 6, 176 + 28, 14, 14, 14);
}
MekanismRenderHelper renderHelper = new MekanismRenderHelper();
for (int i = 0; i < slotPosMap.size(); i++) {
int x = slotPosMap.get(i).xPos;
int y = slotPosMap.get(i).yPos;
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.byIndex(i));
if (configurable.getConfig().getOutput(TransmissionType.ITEM, EnumFacing.byIndex(i)) != TileComponentConfig.EMPTY) {
MekanismRenderHelper renderHelper = new MekanismRenderHelper().color(color);
renderHelper.color(configurable.getEjector().getInputColor(EnumFacing.byIndex(i)));
if (xAxis >= x && xAxis <= x + 14 && yAxis >= y && yAxis <= y + 14) {
drawTexturedModalRect(guiWidth + x, guiHeight + y, 176, 0, 14, 14);
} else {
drawTexturedModalRect(guiWidth + x, guiHeight + y, 176, 14, 14, 14);
}
renderHelper.cleanup();
renderHelper.cleanup(); //As it is just color and no matrix we can reuse the same one rather than recreating it the next call around
} else {
drawTexturedModalRect(guiWidth + x, guiHeight + y, 176, 28, 14, 14);
}