mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-09-29 20:31:05 +02:00
39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
|
/*
|
||
|
* This file ("RecipeUtil.java") is part of the Actually Additions Mod for Minecraft.
|
||
|
* It is created and owned by Ellpeck and distributed
|
||
|
* under the Actually Additions License to be found at
|
||
|
* http://ellpeck.de/actaddlicense/
|
||
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||
|
*
|
||
|
* © 2016 Ellpeck
|
||
|
*/
|
||
|
|
||
|
package de.ellpeck.actuallyadditions.mod.util;
|
||
|
|
||
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||
|
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||
|
import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe;
|
||
|
import net.minecraft.item.crafting.CraftingManager;
|
||
|
import net.minecraft.item.crafting.IRecipe;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
public class RecipeUtil{
|
||
|
|
||
|
public static LensNoneRecipe lastReconstructorRecipe(){
|
||
|
List<LensNoneRecipe> list = ActuallyAdditionsAPI.reconstructorLensNoneRecipes;
|
||
|
return list.get(list.size()-1);
|
||
|
}
|
||
|
|
||
|
public static CrusherRecipe lastCrusherRecipe(){
|
||
|
List<CrusherRecipe> list = ActuallyAdditionsAPI.crusherRecipes;
|
||
|
return list.get(list.size()-1);
|
||
|
}
|
||
|
|
||
|
public static IRecipe lastIRecipe(){
|
||
|
List list = CraftingManager.getInstance().getRecipeList();
|
||
|
Object recipe = list.get(list.size()-1);
|
||
|
return recipe instanceof IRecipe ? (IRecipe)recipe : null;
|
||
|
}
|
||
|
}
|