mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
API restored! ~
This commit is contained in:
parent
c983836f8d
commit
931eba4cc4
3 changed files with 55 additions and 3 deletions
|
@ -10,10 +10,15 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -38,4 +43,14 @@ public interface IMethodHandler{
|
|||
boolean invokeConversionLens(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
||||
boolean addCrusherRecipes(List<ItemStack> inputs, List<ItemStack> outputOnes, int outputOneAmounts, List<ItemStack> outputTwos, int outputTwoAmounts, int outputTwoChance);
|
||||
|
||||
IBookletPage generateTextPage(int id);
|
||||
|
||||
IBookletPage generatePicturePage(int id, ResourceLocation resLoc, int textStartY);
|
||||
|
||||
IBookletPage generateCraftingPage(int id, IRecipe... recipes);
|
||||
|
||||
IBookletPage generateFurnacePage(int id, ItemStack input, ItemStack result);
|
||||
|
||||
IBookletChapter generateBookletChapter(String identifier, IBookletEntry entry, ItemStack displayStack, IBookletPage... pages);
|
||||
}
|
||||
|
|
|
@ -20,10 +20,14 @@ public class PagePicture extends BookletPage{
|
|||
private final ResourceLocation resLoc;
|
||||
private final int yTextOffset;
|
||||
|
||||
public PagePicture(int localizationKey, String pictureLocation, int yTextOffset){
|
||||
public PagePicture(int localizationKey, ResourceLocation resLoc, int yTextOffset){
|
||||
super(localizationKey);
|
||||
this.yTextOffset = yTextOffset;
|
||||
this.resLoc = AssetUtil.getBookletGuiLocation(pictureLocation);
|
||||
this.yTextOffset = yTextOffset;
|
||||
this.resLoc = resLoc;
|
||||
}
|
||||
|
||||
public PagePicture(int localizationKey, String pictureLocation, int yTextOffset){
|
||||
this(localizationKey, AssetUtil.getBookletGuiLocation(pictureLocation), yTextOffset);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,10 +11,18 @@
|
|||
package de.ellpeck.actuallyadditions.mod.misc;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IMethodHandler;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -235,4 +243,29 @@ public class MethodHandler implements IMethodHandler{
|
|||
}
|
||||
return hasWorkedOnce;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletPage generateTextPage(int id){
|
||||
return new PageTextOnly(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletPage generatePicturePage(int id, ResourceLocation resLoc, int textStartY){
|
||||
return new PagePicture(id, resLoc, textStartY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletPage generateCraftingPage(int id, IRecipe... recipes){
|
||||
return new PageCrafting(id, recipes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletPage generateFurnacePage(int id, ItemStack input, ItemStack result){
|
||||
return new PageFurnace(id, result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBookletChapter generateBookletChapter(String identifier, IBookletEntry entry, ItemStack displayStack, IBookletPage... pages){
|
||||
return new BookletChapter(identifier, entry, displayStack, pages);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue