mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-20 20:22:17 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0e09e2b0d | ||
|
|
5d82f0af54 | ||
|
|
4c36d0625e | ||
|
|
5bfcc73459 | ||
|
|
bc1dd44c41 |
No files matched your search
+1
-1
@@ -2,4 +2,4 @@ mc_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
ccl_version=1.1.3.138
|
||||
ccc_version=1.0.7.+
|
||||
mod_version=2.1.0-GTNH-beta3
|
||||
mod_version=2.1.0-GTNH-beta5
|
||||
@@ -150,7 +150,7 @@ public class BookmarkPanel extends ItemPanel {
|
||||
|
||||
@Override
|
||||
public int getNextX(GuiContainer gui) {
|
||||
return gui.width - prev.w - 2 - ((gui.xSize + gui.width) /2 + 2);
|
||||
return gui.width - prev.w - 2 - ((gui.xSize + gui.width) /2 + 2) - 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ public class BookmarkPanel extends ItemPanel {
|
||||
|
||||
@Override
|
||||
public int getPageX(GuiContainer gui) {
|
||||
return gui.guiLeft * 3 / 2 + gui.xSize + 1 - ((gui.xSize + gui.width) /2 + 2);
|
||||
return gui.guiLeft * 3 / 2 + gui.xSize + 1 - ((gui.xSize + gui.width) / 2 + 2) - 16;
|
||||
}
|
||||
|
||||
public int getHightAdjustment() {
|
||||
@@ -168,8 +168,7 @@ public class BookmarkPanel extends ItemPanel {
|
||||
}
|
||||
|
||||
public int getWidth(GuiContainer gui) {
|
||||
return LayoutManager.getLeftSize(gui) - ( (gui.xSize + gui.width) / 2 + 3 );
|
||||
|
||||
return LayoutManager.getLeftSize(gui) - ( (gui.xSize + gui.width) / 2 + 3 ) - 16;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -105,12 +105,9 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
|
||||
public static HashMap<Integer, LayoutStyle> layoutStyles = new HashMap<>();
|
||||
|
||||
public static boolean ftbUtilsLoaded = false;
|
||||
public static boolean itemsLoaded = false;
|
||||
|
||||
public static void load() {
|
||||
ftbUtilsLoaded = Loader.isModLoaded("FTBU");
|
||||
|
||||
API.addLayoutStyle(0, new LayoutStyleMinecraft());
|
||||
|
||||
instance = new LayoutManager();
|
||||
@@ -142,7 +139,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
return gui.width - 3;
|
||||
}
|
||||
public static int getLeftSize(GuiContainer gui) {
|
||||
return getSideWidth(gui) - ((ftbUtilsLoaded || getGamemode() == 2) ? 18 : 0);
|
||||
return getSideWidth(gui);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -136,7 +136,7 @@ public class LayoutStyleMinecraft extends LayoutStyle
|
||||
|
||||
searchField.y = gui.height - searchField.h - 2;
|
||||
|
||||
dropDown.x = itemPanel.x - 150;
|
||||
dropDown.x = gui.guiLeft;
|
||||
dropDown.h = 20;
|
||||
dropDown.w = Math.min(itemPanel.prev.x - dropDown.x - 3, 100);
|
||||
searchField.h = 20;
|
||||
|
||||
@@ -43,14 +43,14 @@ public class DrawableResource extends Image {
|
||||
public void draw(int xOffset, int yOffset, int maskTop, int maskBottom, int maskLeft, int maskRight) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(this.resourceLocation);
|
||||
|
||||
int x = xOffset + this.paddingLeft + maskLeft;
|
||||
int y = yOffset + this.paddingTop + maskTop;
|
||||
int u = this.x + maskLeft;
|
||||
int v = this.y + maskTop;
|
||||
int width = this.width - maskRight - maskLeft;
|
||||
int height = this.height - maskBottom - maskTop;
|
||||
final int x = xOffset + this.paddingLeft + maskLeft;
|
||||
final int y = yOffset + this.paddingTop + maskTop;
|
||||
final int textureX = this.x + maskLeft;
|
||||
final int textureY = this.y + maskTop;
|
||||
final int width = this.width - maskRight - maskLeft;
|
||||
final int height = this.height - maskBottom - maskTop;
|
||||
// drawModalRectWithCustomSizedTexture
|
||||
Gui.func_146110_a(x, y, u, v, width, height, textureWidth, textureHeight);
|
||||
Gui.func_146110_a(x, y, textureX, textureY, width, height, textureWidth, textureHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import codechicken.nei.api.INEIGuiHandler;
|
||||
import codechicken.nei.api.IOverlayHandler;
|
||||
import codechicken.nei.api.IRecipeOverlayRenderer;
|
||||
import codechicken.nei.api.TaggedInventoryArea;
|
||||
import codechicken.nei.drawable.DrawableBuilder;
|
||||
import codechicken.nei.drawable.DrawableResource;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.guihook.IContainerTooltipHandler;
|
||||
import codechicken.nei.guihook.IGuiClientSide;
|
||||
@@ -34,9 +36,41 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOverlay, IGuiClientSide, IGuiHandleMouseWheel, IContainerTooltipHandler, INEIGuiHandler
|
||||
{
|
||||
public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOverlay, IGuiClientSide, IGuiHandleMouseWheel, IContainerTooltipHandler, INEIGuiHandler {
|
||||
// Background image calculations
|
||||
private static final int BG_TOP_HEIGHT = 6;
|
||||
private static final int BG_MIDDLE_HEIGHT = 154;
|
||||
private static final int BG_BOTTOM_HEIGHT = 6;
|
||||
|
||||
private static final int BG_TOP_Y = 0;
|
||||
private static final int BG_MIDDLE_Y = BG_TOP_Y + BG_TOP_HEIGHT;
|
||||
private static final int BG_BOTTOM_Y = BG_MIDDLE_Y + BG_MIDDLE_HEIGHT;
|
||||
|
||||
// Button sizes
|
||||
private static final int borderPadding = 6;
|
||||
private static final int buttonWidth = 13;
|
||||
private static final int buttonHeight = 12;
|
||||
|
||||
// Background image
|
||||
final DrawableResource bgTop = new DrawableBuilder("nei:textures/gui/recipebg.png", 0, BG_TOP_Y, 176, BG_TOP_HEIGHT).build();
|
||||
final DrawableResource bgMiddle = new DrawableBuilder("nei:textures/gui/recipebg.png", 0, BG_MIDDLE_Y, 176, BG_MIDDLE_HEIGHT).build();
|
||||
final DrawableResource bgBottom = new DrawableBuilder("nei:textures/gui/recipebg.png", 0, BG_BOTTOM_Y, 176, BG_BOTTOM_HEIGHT).build();
|
||||
|
||||
public ArrayList<? extends IRecipeHandler> currenthandlers = new ArrayList<>();
|
||||
private static Class gregtechHandler;
|
||||
|
||||
static {
|
||||
try {
|
||||
gregtechHandler = Class.forName("gregtech.nei.GT_NEI_DefaultHandler");
|
||||
} catch (ClassNotFoundException e) {
|
||||
gregtechHandler = null;
|
||||
}
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
// public GuiButton overlay1;
|
||||
// public GuiButton overlay2;
|
||||
// END DEPRECATED
|
||||
|
||||
public int page;
|
||||
public int recipetype;
|
||||
@@ -45,10 +79,12 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
public GuiScreen prevGui;
|
||||
public GuiButton nextpage;
|
||||
public GuiButton prevpage;
|
||||
public GuiButton overlay1;
|
||||
public GuiButton overlay2;
|
||||
private GuiButton nexttype;
|
||||
private GuiButton prevtype;
|
||||
private final Rectangle area = new Rectangle();
|
||||
private final GuiRecipeTabs recipeTabs;
|
||||
|
||||
private int yShift = 0;
|
||||
|
||||
protected GuiRecipe(GuiScreen prevgui) {
|
||||
super(new ContainerRecipe());
|
||||
@@ -67,25 +103,43 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
this.xSize = 176;
|
||||
this.ySize = Math.min(Math.max(this.height - 68, 166), 370);
|
||||
super.initGui();
|
||||
|
||||
currenthandlers = getCurrentRecipeHandlers(); // Probably don't comment me out
|
||||
GuiButton nexttype = new GuiNEIButton(0, width / 2 - 70, (height - ySize) / 2 + 3, 13, 12, "<");
|
||||
GuiButton prevtype = new GuiNEIButton(1, width / 2 + 57, (height - ySize) / 2 + 3, 13, 12, ">");
|
||||
nextpage = new GuiNEIButton(2, width / 2 - 70, (height + ySize) / 2 - 18, 13, 12, "<");
|
||||
prevpage = new GuiNEIButton(3, width / 2 + 57, (height + ySize) / 2 - 18, 13, 12, ">");
|
||||
overlay1 = new GuiNEIButton(4, width / 2 + 65, (height - ySize) / 2 + 63, 13, 12, "?");
|
||||
overlay2 = new GuiNEIButton(5, width / 2 + 65, (height - ySize) / 2 + 128, 13, 12, "?");
|
||||
this.guiTop = (this.height - this.ySize) / 2 + 10;
|
||||
|
||||
buttonList.addAll(Arrays.asList(nexttype, prevtype, nextpage, prevpage, overlay1, overlay2));
|
||||
currenthandlers = getCurrentRecipeHandlers(); // Probably don't comment me out
|
||||
final int rightButtonX = guiLeft + xSize - borderPadding - buttonWidth;
|
||||
final int leftButtonX = guiLeft + borderPadding;
|
||||
|
||||
nexttype = new GuiNEIButton(0, leftButtonX, guiTop + 3, buttonWidth, buttonHeight, "<");
|
||||
prevtype = new GuiNEIButton(1, rightButtonX, guiTop + 3, buttonWidth, buttonHeight, ">");
|
||||
|
||||
nextpage = new GuiNEIButton(2, leftButtonX, guiTop + 17, buttonWidth, buttonHeight, "<");
|
||||
prevpage = new GuiNEIButton(3, rightButtonX, guiTop + 17, buttonWidth, buttonHeight, ">");
|
||||
|
||||
// overlay1 = new GuiNEIButton(4, width / 2 + 65, guiTop + 63, buttonWidth, buttonHeight, "?");
|
||||
// overlay2 = new GuiNEIButton(5, width / 2 + 65, guiTop + 128, buttonWidth, buttonHeight, "?");
|
||||
|
||||
buttonList.addAll(Arrays.asList(nexttype, prevtype, nextpage, prevpage));
|
||||
|
||||
if (currenthandlers.size() == 1) {
|
||||
nexttype.visible = false;
|
||||
prevtype.visible = false;
|
||||
}
|
||||
checkGregTech();
|
||||
recipeTabs.initLayout();
|
||||
refreshPage();
|
||||
}
|
||||
private void checkGregTech() {
|
||||
IRecipeHandler handler = currenthandlers.get(recipetype);
|
||||
if (gregtechHandler != null && gregtechHandler.isInstance(handler)) {
|
||||
// Gregtech decided to shift their handler by -8 and draw over shit...
|
||||
yShift = 6;
|
||||
} else {
|
||||
yShift = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char c, int i) {
|
||||
@@ -98,7 +152,8 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
return;
|
||||
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int recipe = page * recipehandler.recipiesPerPage(); recipe < recipehandler.numRecipes() && recipe < (page + 1) * recipehandler.recipiesPerPage(); recipe++)
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
for (int recipe = page * recipesPerPage; recipe < recipehandler.numRecipes() && recipe < (page + 1) * recipesPerPage; recipe++)
|
||||
if (recipehandler.keyTyped(this, c, i, recipe))
|
||||
return;
|
||||
|
||||
@@ -120,7 +175,8 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int button) {
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int recipe = page * recipehandler.recipiesPerPage(); recipe < recipehandler.numRecipes() && recipe < (page + 1) * recipehandler.recipiesPerPage(); recipe++)
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
for (int recipe = page * recipesPerPage; recipe < recipehandler.numRecipes() && recipe < (page + 1) * recipesPerPage; recipe++)
|
||||
if (recipehandler.mouseClicked(this, button, recipe))
|
||||
return;
|
||||
if (recipeTabs.mouseClicked(x, y, button))
|
||||
@@ -131,6 +187,7 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton guibutton) {
|
||||
super.actionPerformed(guibutton);
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
switch (guibutton.id) {
|
||||
case 0:
|
||||
prevType();
|
||||
@@ -144,12 +201,12 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
case 3:
|
||||
nextPage();
|
||||
break;
|
||||
case 4:
|
||||
overlayRecipe(page * currenthandlers.get(recipetype).recipiesPerPage());
|
||||
break;
|
||||
case 5:
|
||||
overlayRecipe(page * currenthandlers.get(recipetype).recipiesPerPage() + 1);
|
||||
break;
|
||||
// case 4:
|
||||
// overlayRecipe(page * recipesPerPage);
|
||||
// break;
|
||||
// case 5:
|
||||
// overlayRecipe(page * recipesPerPage + 1);
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,8 +219,9 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) {
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++)
|
||||
for (int i = page * recipesPerPage; i < recipehandler.numRecipes() && i < (page + 1) * recipesPerPage; i++)
|
||||
currenttip = recipehandler.handleTooltip(this, currenttip, i);
|
||||
recipeTabs.handleTooltip(mousex, mousey, currenttip);
|
||||
return currenttip;
|
||||
@@ -171,8 +229,9 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
@Override
|
||||
public List<String> handleItemTooltip(GuiContainer gui, ItemStack stack, int mousex, int mousey, List<String> currenttip) {
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++)
|
||||
for (int i = page * recipesPerPage; i < recipehandler.numRecipes() && i < (page + 1) * recipesPerPage; i++)
|
||||
currenttip = recipehandler.handleItemTooltip(this, stack, currenttip, i);
|
||||
|
||||
return currenttip;
|
||||
@@ -185,14 +244,12 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
private void nextPage() {
|
||||
page++;
|
||||
if (page > (currenthandlers.get(recipetype).numRecipes() - 1) / currenthandlers.get(recipetype).recipiesPerPage())
|
||||
page = 0;
|
||||
if (page > (currenthandlers.get(recipetype).numRecipes() - 1) / getRecipesPerPage()) page = 0;
|
||||
}
|
||||
|
||||
private void prevPage() {
|
||||
page--;
|
||||
if (page < 0)
|
||||
page = (currenthandlers.get(recipetype).numRecipes() - 1) / currenthandlers.get(recipetype).recipiesPerPage();
|
||||
if (page < 0) page = (currenthandlers.get(recipetype).numRecipes() - 1) / getRecipesPerPage();
|
||||
}
|
||||
|
||||
private void nextType() {
|
||||
@@ -205,27 +262,26 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
public void setRecipePage(int idx) {
|
||||
recipetype = idx;
|
||||
if (recipetype < 0)
|
||||
recipetype = currenthandlers.size() - 1;
|
||||
else if (recipetype >= currenthandlers.size())
|
||||
recipetype = 0;
|
||||
if (recipetype < 0) recipetype = currenthandlers.size() - 1;
|
||||
else if (recipetype >= currenthandlers.size()) recipetype = 0;
|
||||
page = 0;
|
||||
recipeTabs.calcPageNumber();
|
||||
checkGregTech();
|
||||
}
|
||||
|
||||
private void overlayRecipe(int recipe) {
|
||||
IRecipeOverlayRenderer renderer = currenthandlers.get(recipetype).getOverlayRenderer(firstGui, recipe);
|
||||
IOverlayHandler handler = currenthandlers.get(recipetype).getOverlayHandler(firstGui, recipe);
|
||||
boolean shift = NEIClientUtils.shiftKey();
|
||||
|
||||
if (handler != null && (renderer == null || shift)) {
|
||||
mc.displayGuiScreen(firstGui);
|
||||
handler.overlayRecipe(firstGui, currenthandlers.get(recipetype), recipe, shift);
|
||||
} else if (renderer != null) {
|
||||
mc.displayGuiScreen(firstGui);
|
||||
LayoutManager.overlayRenderer = renderer;
|
||||
}
|
||||
}
|
||||
// private void overlayRecipe(int recipe) {
|
||||
// IRecipeOverlayRenderer renderer = currenthandlers.get(recipetype).getOverlayRenderer(firstGui, recipe);
|
||||
// IOverlayHandler handler = currenthandlers.get(recipetype).getOverlayHandler(firstGui, recipe);
|
||||
// boolean shift = NEIClientUtils.shiftKey();
|
||||
//
|
||||
// if (handler != null && (renderer == null || shift)) {
|
||||
// mc.displayGuiScreen(firstGui);
|
||||
// handler.overlayRecipe(firstGui, currenthandlers.get(recipetype), recipe, shift);
|
||||
// } else if (renderer != null) {
|
||||
// mc.displayGuiScreen(firstGui);
|
||||
// LayoutManager.overlayRenderer = renderer;
|
||||
// }
|
||||
// }
|
||||
|
||||
public void refreshPage() {
|
||||
refreshSlots();
|
||||
@@ -235,33 +291,38 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
area.x = guiLeft - 2;
|
||||
area.y = guiTop - 4;
|
||||
|
||||
final boolean avarita = handler.getClass().toString().contains("fox.spiteful.avaritia.compat.nei.");
|
||||
if (avarita) {
|
||||
area.width = 256;
|
||||
area.height = 208;
|
||||
}
|
||||
calcArea(handler);
|
||||
checkGregTech();
|
||||
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
boolean multiplepages = handler.numRecipes() > recipesPerPage;
|
||||
nextpage.enabled = prevpage.enabled = multiplepages;
|
||||
|
||||
boolean multiplepages = handler.numRecipes() > handler.recipiesPerPage();
|
||||
nextpage.visible = multiplepages;
|
||||
prevpage.visible = multiplepages;
|
||||
|
||||
if(firstGui != null) {
|
||||
overlay1.yPosition = (height - ySize) / 2 + (handler.recipiesPerPage() == 2 ? 63 : 128);
|
||||
overlay1.visible = handler.hasOverlay(firstGui, firstGui.inventorySlots, page * handler.recipiesPerPage());
|
||||
overlay2.visible = handler.recipiesPerPage() == 2 && page * handler.recipiesPerPage() + 1 < handler.numRecipes() &&
|
||||
handler.hasOverlay(firstGui, firstGui.inventorySlots, page * handler.recipiesPerPage() + 1);
|
||||
} else {
|
||||
overlay1.visible = overlay2.visible = false;
|
||||
}
|
||||
// // TODO: Display overlay buttons here again
|
||||
// if(firstGui != null) {
|
||||
// overlay1.yPosition = guiTop + 17 + (recipesPerPage == 2 ? 63 : 128);
|
||||
// overlay1.visible = handler.hasOverlay(firstGui, firstGui.inventorySlots, page * recipesPerPage);
|
||||
// overlay2.visible = recipesPerPage == 2 && page * recipesPerPage + 1 < handler.numRecipes() && handler.hasOverlay(firstGui, firstGui.inventorySlots, page * recipesPerPage + 1);
|
||||
// } else {
|
||||
// overlay1.visible = overlay2.visible = false;
|
||||
// }
|
||||
|
||||
recipeTabs.refreshPage();
|
||||
}
|
||||
|
||||
private void calcArea(IRecipeHandler handler) {
|
||||
if ( handler.getClass().toString().contains("fox.spiteful.avaritia.compat.nei.")) {
|
||||
// Handle Avarita's oversized handler area
|
||||
area.width = 256;
|
||||
area.height = 208;
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshSlots() {
|
||||
slotcontainer.inventorySlots.clear();
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++) {
|
||||
for (int i = page * recipesPerPage; i < recipehandler.numRecipes() && i < (page + 1) * recipesPerPage; i++) {
|
||||
Point p = getRecipePosition(i);
|
||||
|
||||
List<PositionedStack> stacks = recipehandler.getIngredientStacks(i);
|
||||
@@ -281,16 +342,16 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
GuiContainerManager.enable2DRender();
|
||||
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
String s = recipehandler.getRecipeName();
|
||||
fontRendererObj.drawString(s, (xSize - fontRendererObj.getStringWidth(s)) / 2, 5, 0x404040);
|
||||
s = NEIClientUtils.translate("recipe.page", page + 1, (currenthandlers.get(recipetype).numRecipes() - 1) / recipehandler.recipiesPerPage() + 1);
|
||||
fontRendererObj.drawString(s, (xSize - fontRendererObj.getStringWidth(s)) / 2, ySize - 16, 0x404040);
|
||||
fontRendererObj.drawStringWithShadow(s, (xSize - fontRendererObj.getStringWidth(s)) / 2, 5, 0xffffff);
|
||||
s = NEIClientUtils.translate("recipe.page", page + 1, (currenthandlers.get(recipetype).numRecipes() - 1) / recipesPerPage + 1);
|
||||
fontRendererObj.drawStringWithShadow(s, (xSize - fontRendererObj.getStringWidth(s)) / 2, 19, 0xffffff);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(5, 16, 0);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++) {
|
||||
GL11.glTranslatef(5, 32 + yShift, 0);
|
||||
for (int i = page * recipesPerPage; i < recipehandler.numRecipes() && i < (page + 1) * recipesPerPage; i++) {
|
||||
recipehandler.drawForeground(i);
|
||||
GL11.glTranslatef(0, 65, 0);
|
||||
}
|
||||
@@ -299,12 +360,24 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||
final int recipesPerPage = getRecipesPerPage();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
CCRenderState.changeTexture("nei:textures/gui/recipebg.png");
|
||||
int j = (width - xSize) / 2;
|
||||
int k = (height - ySize) / 2;
|
||||
drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
|
||||
final int j = (width - xSize) / 2;
|
||||
final int k = guiTop;
|
||||
|
||||
drawBackgroundTiled(j, k);
|
||||
|
||||
drawRect(guiLeft + borderPadding + buttonWidth - 1,
|
||||
nexttype.yPosition,
|
||||
guiLeft + xSize - borderPadding - buttonWidth,
|
||||
nexttype.yPosition + buttonHeight,
|
||||
0x30000000);
|
||||
drawRect(guiLeft + borderPadding + buttonWidth - 1,
|
||||
nextpage.yPosition,
|
||||
guiLeft + xSize - borderPadding - buttonWidth,
|
||||
nextpage.yPosition + buttonHeight,
|
||||
0x30000000);
|
||||
|
||||
if (NEIClientConfig.areJEIStyleTabsVisible()) {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240f, 240f);
|
||||
@@ -313,15 +386,40 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(j + 5, k + 16, 0);
|
||||
GL11.glTranslatef(j + 5, k + 32 + yShift, 0);
|
||||
IRecipeHandler recipehandler = currenthandlers.get(recipetype);
|
||||
for (int i = page * recipehandler.recipiesPerPage(); i < recipehandler.numRecipes() && i < (page + 1) * recipehandler.recipiesPerPage(); i++) {
|
||||
for (int i = page * recipesPerPage; i < recipehandler.numRecipes() && i < (page + 1) * recipesPerPage; i++) {
|
||||
recipehandler.drawBackground(i);
|
||||
GL11.glTranslatef(0, 65, 0);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void drawBackgroundTiled(int j, int k) {
|
||||
// Draw the top
|
||||
bgTop.draw(j, k + BG_TOP_Y);
|
||||
|
||||
// Maybe Tile the middle
|
||||
final int tiledHeight = ySize - BG_TOP_HEIGHT - BG_BOTTOM_HEIGHT;
|
||||
|
||||
if (tiledHeight > 0) {
|
||||
final int yTileCount = tiledHeight / BG_MIDDLE_HEIGHT;
|
||||
final int yRemainder = tiledHeight - (yTileCount * BG_MIDDLE_HEIGHT);
|
||||
final int yStart = k + BG_TOP_HEIGHT + tiledHeight;
|
||||
|
||||
for (int yTile = 0; yTile <= yTileCount; yTile++) {
|
||||
final int tileHeight = (yTile == yTileCount) ? yRemainder : BG_MIDDLE_HEIGHT;
|
||||
final int y = yStart - ((yTile + 1) * BG_MIDDLE_HEIGHT);
|
||||
if (tileHeight > 0) {
|
||||
bgMiddle.draw(j, y, BG_MIDDLE_HEIGHT - tileHeight, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the bottom
|
||||
bgBottom.draw(j, k + ySize - BG_BOTTOM_HEIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiContainer getFirstScreen() {
|
||||
return firstGui;
|
||||
@@ -334,9 +432,24 @@ public abstract class GuiRecipe extends GuiContainer implements IGuiContainerOve
|
||||
|
||||
return stackSlot == mouseoverSlot;
|
||||
}
|
||||
|
||||
private int getRecipesPerPage() {
|
||||
// The handlers give no indication of height, and use hard coded values
|
||||
// The default handlers have a height of 65. Go with the (most likely incorrect) assumption
|
||||
// that if a handler allows more than one recipe per page the height is 65 so use that to calculate the # per page.
|
||||
// If it only allows for 1 then it's unknown and we'll stick with 1 recipe per page.
|
||||
|
||||
final IRecipeHandler handler = currenthandlers.get(recipetype);
|
||||
final int handlerRecipesPerPage = handler.recipiesPerPage();
|
||||
if (handler instanceof TemplateRecipeHandler && handlerRecipesPerPage > 1) {
|
||||
return ((ySize - (prevtype.height*3)) / 65);
|
||||
} else {
|
||||
return handlerRecipesPerPage;
|
||||
}
|
||||
}
|
||||
|
||||
public Point getRecipePosition(int recipe) {
|
||||
return new Point(5, 16 + (recipe % currenthandlers.get(recipetype).recipiesPerPage()) * 65);
|
||||
return new Point(5, 32 + yShift + (recipe % getRecipesPerPage()) * 65);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -201,7 +201,6 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
|
||||
// Gregtech 5u
|
||||
if (!Loader.isModLoaded("gregapi_post") && Loader.isModLoaded("gregtech")) {
|
||||
addToStackMap("gt.recipe.alloyblastsmelter", "gregtech", "gregtech:gt.blockmachines:810"); // gt.blockmachines.industrialsalloyamelter.controller.tier.single
|
||||
addToStackMap("gt.recipe.alloysmelter", "gregtech", "gregtech:gt.blockmachines:201"); // gt.blockmachines.basicmachine.alloysmelter.tier.01
|
||||
addToStackMap("gt.recipe.arcfurnace", "gregtech", "gregtech:gt.blockmachines:651"); // gt.blockmachines.basicmachine.arcfurnace.tier.01
|
||||
addToStackMap("gt.recipe.assembler", "gregtech", "gregtech:gt.blockmachines:211"); // gt.blockmachines.basicmachine.assembler.tier.01
|
||||
@@ -210,36 +209,28 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("gt.recipe.brewer", "gregtech", "gregtech:gt.blockmachines:491"); // gt.blockmachines.basicmachine.brewery.tier.01
|
||||
addToStackMap("gt.recipe.canner", "gregtech", "gregtech:gt.blockmachines:231"); // gt.blockmachines.basicmachine.canner.tier.01
|
||||
addToStackMap("gt.recipe.centrifuge", "gregtech", "gregtech:gt.blockmachines:361"); // gt.blockmachines.basicmachine.centrifuge.tier.01
|
||||
addToStackMap("gt.recipe.chemicalbath", "gregtech", "gregtech:gt.blockmachines:541"); // gt.blockmachines.basicmachine.chemicalbath.tier.01
|
||||
addToStackMap("gt.recipe.chemicaldehydrator", "gregtech", "gregtech:gt.blockmachines:912"); // gt.blockmachines.machine.dehydrator.tier.01
|
||||
addToStackMap("gt.recipe.chemicalbath", "gregtech", "gregtech:gt.blockmachines:541"); // gt.blockmachines.basicmachine.chemicalbath.tier.01
|
||||
addToStackMap("gt.recipe.chemicalreactor", "gregtech", "gregtech:gt.blockmachines:421"); // gt.blockmachines.basicmachine.chemicalreactor.tier.01
|
||||
addToStackMap("gt.recipe.circuitassembler", "gregtech", "gregtech:gt.blockmachines:1180"); // gt.blockmachines.basicmachine.circuitassembler.tier.01
|
||||
addToStackMap("gt.recipe.cokeoven", "gregtech", "gregtech:gt.blockmachines:791"); // gt.blockmachines.industrialcokeoven.controller.tier.single
|
||||
addToStackMap("gt.recipe.compressor", "gregtech", "gregtech:gt.blockmachines:241"); // gt.blockmachines.basicmachine.compressor.tier.01
|
||||
addToStackMap("gt.recipe.craker", "gregtech", "gregtech:gt.blockmachines:1160"); // gt.blockmachines.multimachine.cracker
|
||||
addToStackMap("gt.recipe.cuttingsaw", "gregtech", "gregtech:gt.blockmachines:251"); // gt.blockmachines.basicmachine.cutter.tier.01
|
||||
addToStackMap("gt.recipe.cyclotron", "gregtech", "gregtech:gt.blockmachines:828"); // gt.blockmachines.cyclotron.tier.single
|
||||
addToStackMap("gt.recipe.dieselgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:793"); // gt.blockmachines.advancedgenerator.rocketfuel.tier.01
|
||||
addToStackMap("gt.recipe.cuttingsaw", "gregtech", "gregtech:gt.blockmachines:251"); // gt.blockmachines.basicmachine.cutter.tier.01
|
||||
addToStackMap("gt.recipe.distillationtower", "gregtech", "gregtech:gt.blockmachines:1126"); // gt.blockmachines.multimachine.distillationtower
|
||||
addToStackMap("gt.recipe.distillery", "gregtech", "gregtech:gt.blockmachines:531"); // gt.blockmachines.basicmachine.distillery.tier.01
|
||||
addToStackMap("gt.recipe.electricimplosioncompressor", "gregtech", "gregtech:gt.blockmachines:12734"); // gt.blockmachines.electricimplosioncompressor
|
||||
addToStackMap("gt.recipe.electrolyzer", "gregtech", "gregtech:gt.blockmachines:371"); // gt.blockmachines.basicmachine.electrolyzer.tier.01
|
||||
addToStackMap("gt.recipe.electromagneticseparator", "gregtech", "gregtech:gt.blockmachines:561"); // gt.blockmachines.basicmachine.electromagneticseparator.tier.01
|
||||
addToStackMap("gt.recipe.extractor", "gregtech", "gregtech:gt.blockmachines:271"); // gt.blockmachines.basicmachine.extractor.tier.01
|
||||
addToStackMap("gt.recipe.extruder", "gregtech", "gregtech:gt.blockmachines:281"); // gt.blockmachines.basicmachine.extruder.tier.01
|
||||
addToStackMap("gt.recipe.fakeAssemblylineProcess", "gregtech", "gregtech:gt.blockmachines:1170"); // gt.blockmachines.multimachine.assemblyline
|
||||
addToStackMap("gt.recipe.fermenter", "gregtech", "gregtech:gt.blockmachines:501"); // gt.blockmachines.basicmachine.fermenter.tier.01
|
||||
addToStackMap("gt.recipe.fishpond", "gregtech", "gregtech:gt.blockmachines:829"); // gt.blockmachines.industrial.fishpond.controller.tier.single
|
||||
addToStackMap("gt.recipe.fermenter", "gregtech", "gregtech:gt.blockmachines:501"); // gt.blockmachines.basicmachine.fermenter.tier.01
|
||||
addToStackMap("gt.recipe.fluidcanner", "gregtech", "gregtech:gt.blockmachines:431"); // gt.blockmachines.basicmachine.fluidcanner.tier.01
|
||||
addToStackMap("gt.recipe.fluidextractor", "gregtech", "gregtech:gt.blockmachines:511"); // gt.blockmachines.basicmachine.fluidextractor.tier.01
|
||||
addToStackMap("gt.recipe.fluidheater", "gregtech", "gregtech:gt.blockmachines:621"); // gt.blockmachines.basicmachine.fluidheater.tier.01
|
||||
addToStackMap("gt.recipe.fluidsolidifier", "gregtech", "gregtech:gt.blockmachines:521"); // gt.blockmachines.basicmachine.fluidsolidifier.tier.01
|
||||
addToStackMap("gt.recipe.fusionreactor", "gregtech", "gregtech:gt.blockmachines:1193"); // gt.blockmachines.fusioncomputer.tier.06
|
||||
addToStackMap("gt.recipe.gasturbinefuel", "gregtech", "gregtech:gt.blockmachines:961"); // gt.blockmachines.basicgenerator.gas.tier.00
|
||||
addToStackMap("gt.recipe.geothermalfuel", "gregtech", "gregtech:gt.blockmachines:830"); // gt.blockmachines.advancedgenerator.geothermalfuel.tier.01
|
||||
addToStackMap("gt.recipe.fusionreactor", "gregtech", "gregtech:gt.blockmachines:1193"); // gt.blockmachines.fusioncomputer.tier.06
|
||||
addToStackMap("gt.recipe.hammer", "gregtech", "gregtech:gt.blockmachines:611"); // gt.blockmachines.basicmachine.hammer.tier.01
|
||||
addToStackMap("gt.recipe.implosioncompressor", "gregtech", "gregtech:gt.blockmachines:12734"); // gt.blockmachines.electricimplosioncompressor
|
||||
addToStackMap("gt.recipe.largeboilerfakefuels", "gregtech", "gregtech:gt.blockmachines:1020"); // gt.blockmachines.multimachine.boiler.bronze
|
||||
addToStackMap("gt.recipe.implosioncompressor", "gregtech", "gregtech:gt.blockmachines:12734"); // gt.blockmachines.electricimplosioncompressor
|
||||
addToStackMap("gt.recipe.largechemicalreactor", "gregtech", "gregtech:gt.blockmachines:1169"); // gt.blockmachines.multimachine.chemicalreactor
|
||||
addToStackMap("gt.recipe.laserengraver", "gregtech", "gregtech:gt.blockmachines:591"); // gt.blockmachines.basicmachine.laserengraver.tier.01
|
||||
addToStackMap("gt.recipe.lathe", "gregtech", "gregtech:gt.blockmachines:291"); // gt.blockmachines.basicmachine.lathe.tier.01
|
||||
@@ -251,8 +242,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("gt.recipe.mixer", "gregtech", "gregtech:gt.blockmachines:581"); // gt.blockmachines.basicmachine.mixer.tier.01
|
||||
addToStackMap("gt.recipe.orewasher", "gregtech", "gregtech:gt.blockmachines:391"); // gt.blockmachines.basicmachine.orewasher.tier.01
|
||||
addToStackMap("gt.recipe.packager", "gregtech", "gregtech:gt.blockmachines:401"); // gt.blockmachines.basicmachine.boxinator.tier.01
|
||||
addToStackMap("gt.recipe.plasmaarcfurnace", "gregtech", "gregtech:gt.blockmachines:661"); // gt.blockmachines.basicmachine.plasmaarcfurnace.tier.01
|
||||
addToStackMap("gt.recipe.plasmageneratorfuels", "gregtech", "gregtech:gt.blockmachines:1196"); // gt.blockmachines.basicgenerator.plasmagenerator.tier.05
|
||||
addToStackMap("gt.recipe.plasmaarcfurnace", "gregtech", "gregtech:gt.blockmachines:661"); // gt.blockmachines.basicmachine.plasmaarcfurnace.tier.01
|
||||
addToStackMap("gt.recipe.polarizer", "gregtech", "gregtech:gt.blockmachines:551"); // gt.blockmachines.basicmachine.polarizer.tier.01
|
||||
addToStackMap("gt.recipe.press", "gregtech", "gregtech:gt.blockmachines:601"); // gt.blockmachines.basicmachine.press.tier.01
|
||||
addToStackMap("gt.recipe.primitiveblastfurnace", "gregtech", "gregtech:gt.blockmachines:140"); // gt.blockmachines.multimachine.brickedblastfurnace
|
||||
@@ -260,34 +250,35 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("gt.recipe.pyro", "gregtech", "gregtech:gt.blockmachines:1159"); // gt.blockmachines.multimachine.pyro
|
||||
addToStackMap("gt.recipe.replicator", "gregtech", "gregtech:gt.blockmachines:481"); // gt.blockmachines.basicmachine.replicator.tier.01
|
||||
addToStackMap("gt.recipe.rockbreaker", "gregtech", "gregtech:gt.blockmachines:441"); // gt.blockmachines.basicmachine.rockbreaker.tier.01
|
||||
addToStackMap("gt.recipe.scanner", "gregtech", "gregtech:gt.blockmachines:341"); // gt.blockmachines.basicmachine.scanner.tier.01
|
||||
addToStackMap("gt.recipe.semifluidboilerfuels", "gregtech", "gregtech:gt.blockmachines:837"); // gt.blockmachines.basicgenerator.semifluid.tier.01
|
||||
addToStackMap("gt.recipe.semifluidgeneratorfuels", "gregtech", "gregtech:gt.blockmachines:837"); // gt.blockmachines.basicgenerator.semifluid.tier.01
|
||||
addToStackMap("gt.recipe.scanner", "gregtech", "gregtech:gt.blockmachines:341"); // gt.blockmachines.basicmachine.scanner.tier.01
|
||||
addToStackMap("gt.recipe.sifter", "gregtech", "gregtech:gt.blockmachines:641"); // gt.blockmachines.basicmachine.sifter.tier.01
|
||||
addToStackMap("gt.recipe.slicer", "gregtech", "gregtech:gt.blockmachines:631"); // gt.blockmachines.basicmachine.slicer.tier.01
|
||||
addToStackMap("gt.recipe.slowfusionreactor", "gregtech", "gregtech:gt.blockmachines:31015"); // gt.blockmachines.gtplusplus.fusion.single
|
||||
addToStackMap("gt.recipe.smallnaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1188"); // gt.blockmachines.basicgenerator.naquadah.tier.07
|
||||
addToStackMap("gt.recipe.slicer", "gregtech", "gregtech:gt.blockmachines:631"); // gt.blockmachines.basicmachine.slicer.tier.01
|
||||
addToStackMap("gt.recipe.thermalcentrifuge", "gregtech", "gregtech:gt.blockmachines:381"); // gt.blockmachines.basicmachine.thermalcentrifuge.tier.01
|
||||
addToStackMap("gt.recipe.thermalgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:830"); // gt.blockmachines.advancedgenerator.geothermalfuel.tier.01
|
||||
addToStackMap("gt.recipe.unpackager", "gregtech", "gregtech:gt.blockmachines:411"); // gt.blockmachines.basicmachine.unboxinator.tier.01
|
||||
addToStackMap("gt.recipe.vacuumfreezer", "gregtech", "gregtech:gt.blockmachines:1002"); // gt.blockmachines.multimachine.vacuumfreezer
|
||||
addToStackMap("gt.recipe.wiremill", "gregtech", "gregtech:gt.blockmachines:351"); // gt.blockmachines.basicmachine.wiremill.tier.01
|
||||
addToStackMap("ic.recipe.recycler", "gregtech", "gregtech:gt.blockmachines:331"); // gt.blockmachines.basicmachine.recycler.tier.01
|
||||
addToStackMap("gt.recipe.byproductlist", "gregtech", "gregtech:gt.metaitem.01:2019");
|
||||
addToStackMap("gt.recipe.cncmachine", "gregtech", "gregtech:gt.metaitem.01:23305");
|
||||
addToStackMap("gt.recipe.uuamplifier", "gregtech", "gregtech:gt.metaitem.02:32512");
|
||||
addToStackMap("gt.recipe.uuamplifier", "gregtech", "gregtech:gt.blockmachines:471"); // Amplifabricator
|
||||
|
||||
addToStackMap("gt.recipe.extremedieselgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:1171");
|
||||
addToStackMap("gt.recipe.largenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:97");
|
||||
addToStackMap("gt.recipe.fluidnaquadahreactor", "gregtech", "gregtech:gt.blockmachines:97");
|
||||
addToStackMap("gt.recipe.hugenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:97");
|
||||
addToStackMap("gt.recipe.extrahugenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:97");
|
||||
addToStackMap("gt.recipe.rocketenginefuel", "gregtech", "GalaxySpace:item.Tier8Rocket");
|
||||
addToStackMap("gt.recipe.RTGgenerators", "gregtech", "IC2:itemRTGPellet");
|
||||
addToStackMap("gt.recipe.componentassembler", "gregtech", "gregtech:gt.blockmachines:211");
|
||||
addToStackMap("bw.fuels.acidgens", "gregtech", "gregtech:gt.blockmachines:12726");
|
||||
addToStackMap("bw.recipe.cal", "gregtech", "gregtech:gt.blockmachines:12735");
|
||||
|
||||
addToStackMap("gt.recipe.byproductlist", "gregtech", "gregtech:gt.metaitem.01:2019"); // Byproducts from ore processing
|
||||
|
||||
addToStackMap("gt.recipe.dieselgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:1110"); // LV Combustion gen
|
||||
addToStackMap("gt.recipe.extremedieselgeneratorfuel", "gregtech", "gregtech:gt.blockmachines:2105"); // ECE, HOG-only
|
||||
addToStackMap("gt.recipe.gasturbinefuel", "gregtech", "gregtech:gt.blockmachines:1115"); // LV gas turbine
|
||||
addToStackMap("gt.recipe.largeboilerfakefuels", "gregtech", "gregtech:gt.blockmachines:1020"); // gt.blockmachines.multimachine.boiler.bronze
|
||||
addToStackMap("gt.recipe.plasmageneratorfuels", "gregtech", "gregtech:gt.blockmachines:1196"); // gt.blockmachines.basicgenerator.plasmagenerator.tier.05
|
||||
addToStackMap("gt.recipe.semifluidboilerfuels", "gregtech", "gregtech:gt.blockmachines:1020"); // Bronze boiler
|
||||
|
||||
addToStackMap("gt.recipe.smallnaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1190"); // Naq Reactor Mark I
|
||||
addToStackMap("gt.recipe.largenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1191"); // Naq Reactor Mark II
|
||||
addToStackMap("gt.recipe.fluidnaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1192"); // Naq Reactor Mark III. Misnamed in code
|
||||
addToStackMap("gt.recipe.hugenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1188"); // Naq Reactor Mark IV. Slightly different name for recipe map
|
||||
addToStackMap("gt.recipe.extrahugenaquadahreactor", "gregtech", "gregtech:gt.blockmachines:1189"); // Naq Reactor Mark V. Slightly different name for recipe map
|
||||
//Fluid naq shares name with what should be huge, so it doesn't show up I guess. Also disabled.
|
||||
|
||||
addToStackMap("gt.recipe.componentassembler", "gregtech", "gregtech:gt.blockmachines:211"); // GT++'s incomplete compound fabricator?
|
||||
addToStackMap("gt.recipe.cncmachine", "gregtech", "gregtech:gt.metaitem.01:23305"); // Disabled CNC machine?
|
||||
addToStackMap("gt.recipe.thermalgeneratorfuel", "gregtech", "IC2:blockGenerator:1"); // Disabled 'Thermal Generator'? Or compat for the IC2 geothermal?
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("appliedenergistics2")) {
|
||||
@@ -325,6 +316,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerAssemblyTable", "BuildCraft", "BuildCraft|Silicon:laserTableBlock");
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerIntegrationTable", "BuildCraft", "BuildCraft|Silicon:laserTableBlock:2");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("BuildCraft|Factory")) {
|
||||
addToStackMap("buildcraft.compat.nei.RecipeHandlerRefinery", "BuildCraft", "BuildCraft|Factory:refineryBlock");
|
||||
}
|
||||
@@ -340,11 +332,19 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioLabHandler", "BartWorks", "gregtech:gt.blockmachines:12699");
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_BioVatHandler", "BartWorks", "gregtech:gt.blockmachines:12712");
|
||||
addToStackMap("com.github.bartimaeusnek.bartworks.neiHandler.BW_NEI_OreHandler", "BartWorks", "bartworks:bw.blockores.01:89");
|
||||
|
||||
addToStackMap("gt.recipe.electricimplosioncompressor", "BartWorks", "gregtech:gt.blockmachines:12734"); // Electric implosion compressor
|
||||
|
||||
addToStackMap("bw.recipe.cal", "BartWorks", "gregtech:gt.blockmachines:12735");
|
||||
|
||||
addToStackMap("bw.fuels.acidgens", "BartWorks", "gregtech:gt.blockmachines:12726");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("tectech")) {
|
||||
addToStackMap("com.github.technus.tectech.nei.TT_NEI_ResearchHandler", "TecTech", "gregtech:gt.blockmachines:15331");
|
||||
addToStackMap("com.github.technus.tectech.nei.TT_NEI_ScannerHandler", "TecTech", "tectech:item.em.definitionScanStorage");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ExtraUtilities")) {
|
||||
addToStackMap("com.rwtema.extrautils.nei.EnderConstructorHandler", "ExtraUtilities", "ExtraUtilities:endConstructor");
|
||||
addToStackMap("com.rwtema.extrautils.nei.FMPMicroBlocksHandler", "ExtraUtilities", "ForgeMicroblock:sawIron");
|
||||
@@ -352,6 +352,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("com.rwtema.extrautils.nei.MicroBlocksHandler", "ExtraUtilities", "ExtraUtilities:microblocks:1");
|
||||
addToStackMap("com.rwtema.extrautils.nei.SoulHandler", "ExtraUtilities", "ExtraUtilities:mini-soul");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("EnderIO")) {
|
||||
addToStackMap("crazypants.enderio.nei.AlloySmelterRecipeHandler", "EnderIO", "EnderIO:blockAlloySmelter");
|
||||
addToStackMap("crazypants.enderio.nei.EnchanterRecipeHandler", "EnderIO", "EnderIO:blockEnchanter");
|
||||
@@ -375,20 +376,22 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerSqueezer", "Forestry", "Forestry:factory:5");
|
||||
addToStackMap("forestry.factory.recipes.nei.NEIHandlerStill", "Forestry", "Forestry:factory:6");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Avaritia")) {
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.CompressionHandler", "Avaritia", "Avaritia:Neutronium_Compressor");
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.ExtremeShapedRecipeHandler", "Avaritia", "Avaritia:Dire_Crafting");
|
||||
addToStackMap("fox.spiteful.avaritia.compat.nei.ExtremeShapelessRecipeHandler", "Avaritia", "Avaritia:Dire_Crafting");
|
||||
}
|
||||
|
||||
|
||||
if (Loader.isModLoaded("GalacticraftCore")) {
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT1RecipeHandler", "Galacticraft", "GalacticraftCore:item.spaceship");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("GalacticraftMars")) {
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT2RecipeHandler", "Galacticraft", "GalacticraftMars:item.spaceshipTier2:1");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT3RecipeHandler", "Galacticraft", "GalacticraftMars:item.itemTier3Rocket");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("GalaxySpace")) {
|
||||
addToStackMap("galaxyspace.core.nei.AssemblyMachineRecipeHandler", "GalaxySpace", "GalaxySpace:assemblymachine");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT4RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier4Rocket");
|
||||
@@ -397,37 +400,42 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT7RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier7Rocket");
|
||||
addToStackMap("galaxyspace.core.nei.rocket.RocketT8RecipeHandler", "GalaxySpace", "GalaxySpace:item.Tier8Rocket");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ProjectBlue")) {
|
||||
addToStackMap("gcewing.projectblue.nei.NEIRecipeHandler", "ProjectBlue", "ProjectBlue:sprayCan");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
/* GT++ */
|
||||
if (Loader.isModLoaded("miscutils")) {
|
||||
addToStackMap("gtPlusPlus.nei.DecayableRecipeHandler", "GT++", "miscutils:dustRadium226");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_FlotationCell", "GT++", "gregtech:gt.blockmachines:31028");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_FluidReactor", "GT++", "gregtech:gt.blockmachines:998");
|
||||
addToStackMap("gtPlusPlus.nei.GT_NEI_MillingMachine", "GT++", "gregtech:gt.blockmachines:31027");
|
||||
|
||||
addToStackMap("gt.recipe.advanced.mixer", "GT++", "gregtech:gt.blockmachines:811");
|
||||
addToStackMap("gt.recipe.alloyblastsmelter", "gregtech", "gregtech:gt.blockmachines:810"); // ABS
|
||||
addToStackMap("gt.recipe.cokeoven", "GT++", "gregtech:gt.blockmachines:791"); // ICO
|
||||
addToStackMap("gt.recipe.cryogenicfreezer", "GT++", "gregtech:gt.blockmachines:910");
|
||||
addToStackMap("gt.recipe.cyclotron", "GT++", "gregtech:gt.blockmachines:828"); // Cyclotron
|
||||
addToStackMap("gt.recipe.fishpond", "GT++", "gregtech:gt.blockmachines:829"); // Zhuhai
|
||||
addToStackMap("gt.recipe.matterfab2", "GT++", "gregtech:gt.blockmachines:799");
|
||||
addToStackMap("gt.recipe.multicentrifuge", "GT++", "gregtech:gt.blockmachines:790");
|
||||
addToStackMap("gt.recipe.multielectro", "GT++", "gregtech:gt.blockmachines:796");
|
||||
addToStackMap("gt.recipe.multielectro", "GT++", "gregtech:gt.blockmachines:796");
|
||||
addToStackMap("gt.recipe.vacfurnace", "GT++", "gregtech:gt.blockmachines:995");
|
||||
|
||||
addToStackMap("gt.recipe.lftr", "GT++", "gregtech:gt.blockmachines:751");
|
||||
addToStackMap("gt.recipe.lftr.2", "GT++", "gregtech:gt.blockmachines:751");
|
||||
|
||||
addToStackMap("gt.recipe.fissionfuel", "GT++", "gregtech:gt.blockmachines:835");
|
||||
addToStackMap("gt.recipe.vacfurnace", "GT++", "gregtech:gt.blockmachines:995");
|
||||
addToStackMap("gt.recipe.lftr", "GT++", "gregtech:gt.blockmachines:751");
|
||||
addToStackMap("gt.recipe.advanced.mixer", "GT++", "gregtech:gt.blockmachines:811");
|
||||
addToStackMap("gt.recipe.lftr.2", "GT++", "gregtech:gt.blockmachines:751");
|
||||
addToStackMap("gt.recipe.alloyblastsmelter", "GT++", "gregtech:gt.blockmachines:810");
|
||||
|
||||
addToStackMap("gt.recipe.geothermalfuel", "GT++", "gregtech:gt.blockmachines:830");
|
||||
|
||||
addToStackMap("gt.recipe.cyclotron", "GT++", "gregtech:gt.blockmachines:828");
|
||||
addToStackMap("gt.recipe.rocketenginefuel", "GT++", "gregtech:gt.blockmachines:793"); // Basic (EV) rocket fuel gen
|
||||
addToStackMap("gt.recipe.RTGgenerators", "GT++", "gregtech:gt.blockmachines:869"); // GT++ version of the RTG
|
||||
addToStackMap("gt.recipe.semifluidgeneratorfuels", "GT++", "gregtech:gt.blockmachines:837"); // Semifluid gen
|
||||
|
||||
addToStackMap("gt.recipe.chemicaldehydrator", "GT++", "gregtech:gt.blockmachines:911"); // Dehydrator
|
||||
addToStackMap("gt.recipe.simplewasher", "GT++", "gregtech:gt.blockmachines:767");
|
||||
addToStackMap("gt.recipe.matterfab2", "GT++", "gregtech:gt.blockmachines:799");
|
||||
addToStackMap("gt.recipe.chemicaldehydrator", "GT++", "gregtech:gt.blockmachines:813");
|
||||
addToStackMap("gt.recipe.slowfusionreactor", "GT++", "gregtech:gt.blockmachines:31015");
|
||||
addToStackMap("gt.recipe.fishpond", "GT++", "gregtech:gt.blockmachines:829");
|
||||
addToStackMap("gt.recipe.geothermalfuel", "GT++", "gregtech:gt.blockmachines:830");
|
||||
addToStackMap("gt.recipe.cokeoven", "GT++", "gregtech:gt.blockmachines:791");
|
||||
addToStackMap("gt.recipe.slowfusionreactor", "gregtech", "gregtech:gt.blockmachines:31015"); // gt.blockmachines.gtplusplus.fusion.single
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Forestry")) {
|
||||
addToStackMap("hellfirepvp.beebetteratbees.client.gui.BBABGuiRecipeTreeHandler", "Bees", "Forestry:beeQueenGE");
|
||||
}
|
||||
@@ -447,6 +455,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.mars.nei.GasLiquefierRecipeHandler", "Galacticraft", "GalacticraftMars:tile.marsMachineT2");
|
||||
addToStackMap("micdoodle8.mods.galacticraft.planets.mars.nei.MethaneSynthesizerRecipeHandler", "Galacticraft", "GalacticraftMars:tile.marsMachineT2:4");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ProjRed|Transmission")) {
|
||||
addToStackMap("mrtjp.projectred.core.libmc.recipe.PRShapedRecipeHandler", "ProjectRed", "ProjRed|Transmission:projectred.transmission.wire:7");
|
||||
addToStackMap("mrtjp.projectred.core.libmc.recipe.PRShapelessRecipeHandler", "ProjectRed", "ProjRed|Transmission:projectred.transmission.wire:7");
|
||||
@@ -474,11 +483,12 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("net.bdew.neiaddons.forestry.butterflies.ButterflyBreedingHandler", "Forestry", "Forestry:butterflyGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.trees.TreeBreedingHandler", "Forestry", "Forestry:saplingGE");
|
||||
addToStackMap("net.bdew.neiaddons.forestry.trees.TreeProduceHandler", "Forestry", "Forestry:saplingGE");
|
||||
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ae2wct")) {
|
||||
addToStackMap("net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler", "WirelessCraftingTerminal", "ae2wct:wirelessCraftingTerminal");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("gregtech")) {
|
||||
addToStackMap("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat", "Gregtech", "gregtech:gt.blockores:85");
|
||||
addToStackMap("pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat", "Gregtech", "gregtech:gt.blockores:386");
|
||||
@@ -498,6 +508,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerMelting", "Tinker's Construct", "TConstruct:LavaTank:2");
|
||||
addToStackMap("tconstruct.plugins.nei.RecipeHandlerToolMaterials", "Tinker's Construct", "TConstruct:ToolStationBlock");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("chisel")) {
|
||||
addToStackMap("team.chisel.compat.nei.RecipeHandlerChisel", "Chisel", "chisel:chisel");
|
||||
}
|
||||
@@ -509,6 +520,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerPresser", "Pam's Harvestcraft", "harvestcraft:presser");
|
||||
addToStackMap("tonius.neiintegration.mods.harvestcraft.RecipeHandlerQuern", "Pam's Harvestcraft", "harvestcraft:quern");
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("harvestcraft")) {
|
||||
addToStackMap("tonius.neiintegration.mods.mcforge.RecipeHandlerFluidRegistry", "Minecraft", "minecraft:water");
|
||||
addToStackMap("tonius.neiintegration.mods.mcforge.RecipeHandlerOreDictionary", "Minecraft", "minecraft:iron_ore");
|
||||
@@ -521,7 +533,7 @@ public abstract class GuiRecipeTab extends Widget {
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerRollingMachineShaped", "Railcraft", "Railcraft:machine.alpha:8");
|
||||
addToStackMap("tonius.neiintegration.mods.railcraft.RecipeHandlerRollingMachineShapeless", "Railcraft", "Railcraft:machine.alpha:8");
|
||||
}
|
||||
|
||||
/* Blood Magic */
|
||||
if (Loader.isModLoaded("AWWayofTime")) {
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIAlchemyRecipeHandler", "BloodMagic", "AWWayofTime:blockWritingTable");
|
||||
addToStackMap("WayofTime.alchemicalWizardry.client.nei.NEIAltarRecipeHandler", "BloodMagic", "AWWayofTime:Altar");
|
||||
|
||||
@@ -102,7 +102,7 @@ public class GuiRecipeTabs {
|
||||
};
|
||||
prevTab.w = 8;
|
||||
prevTab.h = tabHeight - 4;
|
||||
prevTab.x = area.x - prevTab.w;
|
||||
prevTab.x = area.x - prevTab.w + 1;
|
||||
prevTab.y = area.y + 2;
|
||||
buttons.add(prevTab);
|
||||
|
||||
@@ -121,7 +121,7 @@ public class GuiRecipeTabs {
|
||||
};
|
||||
nextTab.w = prevTab.w;
|
||||
nextTab.h = prevTab.h;
|
||||
nextTab.x = area.x + area.width;
|
||||
nextTab.x = area.x + area.width - 1;
|
||||
nextTab.y = prevTab.y;
|
||||
buttons.add(nextTab);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user