2015-11-10 21:26:28 +01:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("BookletChapterCrusher.java") is part of the Actually Additions mod for Minecraft.
|
2015-11-10 21:26:28 +01:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-11-10 21:26:28 +01:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-2016 Ellpeck
|
2015-11-10 21:26:28 +01:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
|
2015-11-10 21:26:28 +01:00
|
|
|
|
2016-01-05 14:57:50 +01:00
|
|
|
import de.ellpeck.actuallyadditions.api.booklet.BookletPage;
|
|
|
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
2015-11-10 21:26:28 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
public class BookletChapterCrusher extends BookletChapter{
|
|
|
|
|
2016-01-05 14:57:50 +01:00
|
|
|
public BookletChapterCrusher(String unlocalizedName, IBookletEntry entry, ItemStack displayStack, BookletPage... pages){
|
2015-11-10 21:26:28 +01:00
|
|
|
super(unlocalizedName, entry, displayStack, getPages(pages));
|
|
|
|
}
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
private static BookletPage[] getPages(BookletPage... pages){
|
|
|
|
ArrayList<BookletPage> allPages = new ArrayList<BookletPage>();
|
|
|
|
allPages.addAll(Arrays.asList(pages));
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
for(CrusherRecipe recipe : CrusherCrafting.miscRecipes){
|
2015-11-10 21:26:28 +01:00
|
|
|
allPages.add(new PageCrusherRecipe(allPages.size()+1, recipe).setNoText());
|
|
|
|
}
|
|
|
|
|
|
|
|
return allPages.toArray(new BookletPage[allPages.size()]);
|
|
|
|
}
|
|
|
|
}
|