Removed INEIRecipeHandler and RecipeWrapperWithButton from the API.

They won't work that way.
/shrugs
This commit is contained in:
Ellpeck 2016-01-17 01:14:30 +01:00
parent e130f89296
commit a4f2251ff6
12 changed files with 3 additions and 32 deletions

View file

@ -8,7 +8,7 @@
* © 2016 Ellpeck * © 2016 Ellpeck
*/ */
package de.ellpeck.actuallyadditions.api.integration; package de.ellpeck.actuallyadditions.mod.jei;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
@ -19,10 +19,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
/**
* Make a JEI Recipe Wrapper extend this to make a button show up on the page
* You still need to make it implement IRecipeWrapper!
*/
public abstract class RecipeWrapperWithButton{ public abstract class RecipeWrapperWithButton{
protected TexturedButton theButton; protected TexturedButton theButton;
@ -40,9 +36,6 @@ public abstract class RecipeWrapperWithButton{
}; };
} }
/**
* Handles a click. Return this on IRecipeWrapper's handleClick() method
*/
public boolean handleClick(Minecraft mc, int mouseX, int mouseY){ public boolean handleClick(Minecraft mc, int mouseX, int mouseY){
if(this.theButton.mousePressed(mc, mouseX, mouseY)){ if(this.theButton.mousePressed(mc, mouseX, mouseY)){
this.theButton.playPressSound(mc.getSoundHandler()); this.theButton.playPressSound(mc.getSoundHandler());
@ -59,15 +52,9 @@ public abstract class RecipeWrapperWithButton{
return false; return false;
} }
/**
* Updates the button's rendering. Call this on IRecipeWrapper's drawInfo() method
*/
public void updateButton(Minecraft mc, int mouseX, int mouseY){ public void updateButton(Minecraft mc, int mouseX, int mouseY){
this.theButton.drawButton(mc, mouseX, mouseY); this.theButton.drawButton(mc, mouseX, mouseY);
} }
/**
* The booklet page that will be opened when clicking the button
*/
public abstract BookletPage getPage(); public abstract BookletPage getPage();
} }

View file

@ -13,8 +13,8 @@ package de.ellpeck.actuallyadditions.mod.jei.booklet;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.integration.RecipeWrapperWithButton;
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
import de.ellpeck.actuallyadditions.mod.jei.RecipeWrapperWithButton;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import mezz.jei.api.recipe.IRecipeWrapper; import mezz.jei.api.recipe.IRecipeWrapper;

View file

@ -8,18 +8,11 @@
* © 2016 Ellpeck * © 2016 Ellpeck
*/ */
package de.ellpeck.actuallyadditions.api.integration; package de.ellpeck.actuallyadditions.mod.nei;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
/**
* Make an NEI Recipe Handler implement this to make a button show up on the page
*/
public interface INEIRecipeHandler{ public interface INEIRecipeHandler{
/**
* The page that will be opened when clicking the button
* @param neiIndex the page variable in NEI's GuiRecipe
*/
BookletPage getPageForInfo(int neiIndex); BookletPage getPageForInfo(int neiIndex);
} }

View file

@ -17,7 +17,6 @@ import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;

View file

@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeBrewing;
import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient; import de.ellpeck.actuallyadditions.api.recipe.coffee.CoffeeIngredient;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;

View file

@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;

View file

@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;

View file

@ -16,7 +16,6 @@ import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble;

View file

@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;

View file

@ -16,7 +16,6 @@ import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe; import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;

View file

@ -14,7 +14,6 @@ import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.IRecipeHandler; import codechicken.nei.recipe.IRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton;

View file

@ -17,7 +17,6 @@ import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.recipe.TemplateRecipeHandler; import codechicken.nei.recipe.TemplateRecipeHandler;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
import de.ellpeck.actuallyadditions.api.integration.INEIRecipeHandler;
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;