extentionController.clear();
buttonList.clear();
FluidCraftingExtention extention = null;
if(!isAdvancedSat) {
if(liquidCrafter != 0) extention = new FluidCraftingExtention(0);
addButton(normalButtonArray[0] = new SmallGuiButton(0, (width - xSize) / 2 + 155, (height - ySize) / 2 + 50, 10, 10, ">"));
addButton(normalButtonArray[1] = new SmallGuiButton(1, (width - xSize) / 2 + 120, (height - ySize) / 2 + 50, 10, 10, "<"));
addButton(normalButtonArray[2] = new SmallGuiButton(3, (width - xSize) / 2 + 39, (height - ySize) / 2 + 50, 37, 10, StringUtil.translate(PREFIX + "Import")));
addButton(normalButtonArray[3] = new SmallGuiButton(4, (width - xSize) / 2 + 6, (height - ySize) / 2 + 50, 28, 10, StringUtil.translate(PREFIX + "Open")));
addButton(normalButtonArray[4] = new SmallGuiButton(20, (width - xSize) / 2 + 155, (height - ySize) / 2 + 85, 10, 10, ">"));
addButton(normalButtonArray[5] = new SmallGuiButton(21, (width - xSize) / 2 + 120, (height - ySize) / 2 + 85, 10, 10, "<"));
if(liquidCrafter != 0) {
extention.registerButton(extentionController.registerControlledButton(addButton(normalButtonArray[6] = new SmallGuiButton(22, guiLeft - (liquidCrafter * 40) / 2 + 5, guiTop + 158, 10, 10, ">"))));
extention.registerButton(extentionController.registerControlledButton(addButton(normalButtonArray[7] = new SmallGuiButton(23, guiLeft - (liquidCrafter * 40) / 2 - 15, guiTop + 158, 10, 10, "<"))));
}
} else {
for(int i = 0; i < 9; i++) {
addButton(advancedSatButtonArray[i][0] = new SmallGuiButton(30 + i, (width - xSize) / 2 + 10 + 18 * i, (height - ySize) / 2 + 40, 15, 10, "/\\"));
addButton(advancedSatButtonArray[i][1] = new SmallGuiButton(40 + i, (width - xSize) / 2 + 10 + 18 * i, (height - ySize) / 2 + 70, 15, 10, "\\/"));
}
addButton(normalButtonArray[2] = new SmallGuiButton(3, (width - xSize) / 2 + 39, (height - ySize) / 2 + 100, 37, 10, StringUtil.translate(PREFIX + "Import")));
addButton(normalButtonArray[3] = new SmallGuiButton(4, (width - xSize) / 2 + 6, (height - ySize) / 2 + 100, 28, 10, StringUtil.translate(PREFIX + "Open")));
addButton(normalButtonArray[4] = new SmallGuiButton(20, (width - xSize) / 2 + 155, (height - ySize) / 2 + 105, 10, 10, ">"));
addButton(normalButtonArray[5] = new SmallGuiButton(21, (width - xSize) / 2 + 120, (height - ySize) / 2 + 105, 10, 10, "<"));
}
for(int i = 0; i < liquidCrafter; i++) {
if(isAdvancedSat) {
extention = new FluidCraftingExtention(i);
}
int liquidLeft = 0;
if(isAdvancedSat) {
liquidLeft = guiLeft - 40;
} else {
liquidLeft = guiLeft - (liquidCrafter * 40) + (i * 40);
}
liquidGuiParts[i] = new GuiButton[10];
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][0] = new SmallGuiButton(100 + 10 * i + 0, liquidLeft + 22, guiTop + 65, 10, 10, "+"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][1] = new SmallGuiButton(100 + 10 * i + 1, liquidLeft + 22, guiTop + 85, 10, 10, "+"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][2] = new SmallGuiButton(100 + 10 * i + 2, liquidLeft + 22, guiTop + 105, 10, 10, "+"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][3] = new SmallGuiButton(100 + 10 * i + 3, liquidLeft + 22, guiTop + 125, 10, 10, "+"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][4] = new SmallGuiButton(100 + 10 * i + 4, liquidLeft + 8, guiTop + 65, 10, 10, "-"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][5] = new SmallGuiButton(100 + 10 * i + 5, liquidLeft + 8, guiTop + 85, 10, 10, "-"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][6] = new SmallGuiButton(100 + 10 * i + 6, liquidLeft + 8, guiTop + 105, 10, 10, "-"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][7] = new SmallGuiButton(100 + 10 * i + 7, liquidLeft + 8, guiTop + 125, 10, 10, "-"))));
if(isAdvancedSat) {
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][8] = new SmallGuiButton(100 + 10 * i + 8, liquidLeft + 5, guiTop + 158, 10, 10, "<"))));
extention.registerButton(extentionController.registerControlledButton(addButton(liquidGuiParts[i][9] = new SmallGuiButton(100 + 10 * i + 9, liquidLeft + 25, guiTop + 158, 10, 10, ">"))));
extentionController.addExtention(extention);
}
extention.registerSlot(fluidSlotIDs[i]);
}
if(!isAdvancedSat && liquidCrafter != 0) {
extentionController.addExtention(extention);
}
if(hasByproductExtractor) {
ByproductExtention byproductExtention = new ByproductExtention();
byproductExtention.registerSlot(byproductSlotID);
extentionController.addExtention(byproductExtention);
}
if(cleanupSize > 0) {
CleanupExtention cleanupExtention = new CleanupExtention();
cleanupExtention.registerButton(extentionController.registerControlledButton(addButton(cleanupModeButton = new SmallGuiButton(24, guiLeft - 56, guiTop + 18 + (18 * cleanupSize), 50, 10, StringUtil.translate(PREFIX + (_pipe.cleanupModeIsExclude ? "Exclude" : "Include"))))));
cleanupExtention.registerButton(extentionController.registerControlledButton(addButton(new SmallGuiButton(25, guiLeft - 56, guiTop + 32 + (18 * cleanupSize), 50, 10, StringUtil.translate(PREFIX + "Import")))));
for(int i=0;i<cleanupSize * 3;i++) {
cleanupExtention.registerSlot(cleanupSlotIDs[i]);
}
extentionController.addExtention(cleanupExtention);
}