mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
Some intital work in displaying recipes on the Lexicon.
This commit is contained in:
1 parent
fc3a6b3299
commit
9bfd8ff93f
6 files changed
+94
-3
No files matched your search
@@ -14,6 +14,8 @@ package vazkii.botania.api;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import vazkii.botania.api.internal.DummyMethodHandler;
|
||||
import vazkii.botania.api.internal.IInternalMethodHandler;
|
||||
|
||||
@@ -49,4 +51,20 @@ public final class BotaniaAPI {
|
||||
allEntries.add(entry);
|
||||
category.entries.add(entry);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last recipe to have been added to the recipe list.
|
||||
*/
|
||||
public static IRecipe getLatestAddedRecipe() {
|
||||
List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
return list.get(list.size() - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last x recipes added to the recipe list.
|
||||
*/
|
||||
public static List<IRecipe> getLatestAddedRecipes(int x) {
|
||||
List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
return list.subList(list.size() - 1 - x, list.size() - 1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user