Updated API reference for recipes.

This commit is contained in:
drcrazy 2018-03-05 14:45:23 +03:00
parent 4a369d0ee7
commit 111ee7630a
60 changed files with 76 additions and 156 deletions

View file

@ -32,7 +32,6 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import reborncore.api.recipe.IRecipeCrafterProvider;
import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.tile.SlotConfiguration;
import techreborn.client.gui.GuiBase;
import techreborn.client.gui.slot.GuiSlotConfiguration;
@ -62,8 +61,6 @@ public class ConfigSlotElement extends ElementBase {
return true;
}));
SlotConfiguration.SlotConfigHolder slotConfigHolder = gui.getMachine().slotConfiguration.getSlotDetails(id);
elements.add(new CheckBoxElement("Auto Input", 0xFFFFFFFF, x - 26, y + 42, "input", slotId, Sprite.LIGHT_CHECK_BOX, gui.getMachine()).addPressAction((element, gui12, provider, mouseX, mouseY) -> {
popupElement.updateCheckBox((CheckBoxElement) element, "input", gui12);
return true;

View file

@ -169,10 +169,8 @@ public class SlotConfigPopupElement extends ElementBase {
private boolean isInBox(int rectX, int rectY, int rectWidth, int rectHeight, int pointX, int pointY, GuiBase guiBase){
rectX += getX();
rectY += getY();
if(true){
return isInRect(guiBase, rectX, rectY, rectWidth, rectHeight, pointX, pointY);
}
return (pointX - guiBase.getGuiLeft()) >= rectX - 1 && (pointX - guiBase.getGuiLeft()) < rectX + rectWidth + 1 && (pointY - guiBase.getGuiTop()) >= rectY - 1 && (pointY - guiBase.getGuiTop()) < rectY + rectHeight + 1;
return isInRect(guiBase, rectX, rectY, rectWidth, rectHeight, pointX, pointY);
//return (pointX - guiBase.getGuiLeft()) >= rectX - 1 && (pointX - guiBase.getGuiLeft()) < rectX + rectWidth + 1 && (pointY - guiBase.getGuiTop()) >= rectY - 1 && (pointY - guiBase.getGuiTop()) < rectY + rectHeight + 1;
}
public void drawState(GuiBase gui,