本文整理汇总了Java中thaumcraft.api.ThaumcraftApi.getCraftingRecipes方法的典型用法代码示例。如果您正苦于以下问题:Java ThaumcraftApi.getCraftingRecipes方法的具体用法?Java ThaumcraftApi.getCraftingRecipes怎么用?Java ThaumcraftApi.getCraftingRecipes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thaumcraft.api.ThaumcraftApi
的用法示例。
在下文中一共展示了ThaumcraftApi.getCraftingRecipes方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scan
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void scan() {
for (Object r : ThaumcraftApi.getCraftingRecipes()) {
if (r instanceof CrucibleRecipe) {
CrucibleRecipe crucibleRecipe = (CrucibleRecipe) r;
ItemStack result = crucibleRecipe.getRecipeOutput();
Object input = crucibleRecipe.catalyst;
if (input instanceof ItemStack) {
addCatalyst(new VanillaStackWrapper(result), (ItemStack)input);
} else if (input instanceof List<?>) {
addCatalyst(new VanillaStackWrapper(result), (ItemStack[]) ((List) input).toArray(new ItemStack[((List) input).size()]));
}
}
}
}
示例2: loadCraftingRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadCraftingRecipes(ItemStack result) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++){//Sorry, no enhanced for loop here :P
if (recipes.get(i) instanceof ShapedArcaneRecipe) {
ShapedArcaneRecipe recipe = (ShapedArcaneRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
if (recipe.getRecipeOutput().isItemEqual(result)) {
if (checkDupe(recipe)) {
this.arecipes.add(new CachedShapedArcaneWorkbenchRecipe(recipe));
}
}
}
}
}
}
示例3: loadUsageRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadUsageRecipes(ItemStack ingredient) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++) {//Sorry, no enhanced for loop here again :P
if (recipes.get(i) instanceof ShapedArcaneRecipe) {
ShapedArcaneRecipe recipe = (ShapedArcaneRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
for (Object o : recipe.getInput()) {
if (o instanceof ItemStack) {
ItemStack item = (ItemStack) o;
if (item.isItemEqual(ingredient)) {
if (checkDupe(recipe)) {
this.arecipes.add(new CachedShapedArcaneWorkbenchRecipe(recipe));
}
}
}
}
}
}
}
}
示例4: loadCraftingRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadCraftingRecipes(ItemStack result) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++){//Sorry, no enhanced for loop here :P
if (recipes.get(i) instanceof CrucibleRecipe) {
CrucibleRecipe recipe = (CrucibleRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.key) || Config.cheatMode){
if (recipe.getRecipeOutput().isItemEqual(result)) {
if (checkDupe(recipe)) {
this.arecipes.add(new CachedCrucibleRecipe(recipe));
}
}
}
}
}
}
示例5: loadCraftingRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadCraftingRecipes(ItemStack result) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++){//Sorry, no enhanced for loop here :P
if (recipes.get(i) instanceof InfusionRecipe) {
InfusionRecipe recipe = (InfusionRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
Object output = recipe.getRecipeOutput();
if (output instanceof ItemStack) {
if (((ItemStack)output).isItemEqual(result)) {
if (checkDupe(recipe)) {
this.arecipes.add(new CachedInfusionRecipe(recipe));
}
}
}else {
//TODO
}
}
}
}
}
示例6: loadUsageRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadUsageRecipes(ItemStack ingredient) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++) {//Sorry, no enhanced for loop here again :P
if (recipes.get(i) instanceof InfusionRecipe) {
InfusionRecipe recipe = (InfusionRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
if (recipe.getComponents() != null) {
ArrayList<ItemStack> components = new ArrayList<ItemStack>(Arrays.asList(recipe.getComponents()));
if (recipe.getRecipeInput().isItemEqual(ingredient) || components.contains(ingredient)) {
if (checkDupe(recipe)) {
this.arecipes.add(new CachedInfusionRecipe(recipe));
}
}
}
}
}
}
}
示例7: loadCraftingRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadCraftingRecipes(ItemStack result) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++){//Sorry, no enhanced for loop here :P
if (recipes.get(i) instanceof ShapelessArcaneRecipe) {
ShapelessArcaneRecipe recipe = (ShapelessArcaneRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
if (recipe.getRecipeOutput().isItemEqual(result)) {
if (checkDupe(recipe)) {
CachedShapelessArcaneWorkbenchRecipe r = new CachedShapelessArcaneWorkbenchRecipe(recipe);
r.prepVisuals();
this.arecipes.add(r);
}
}
}
}
}
}
示例8: loadUsageRecipes
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void loadUsageRecipes(ItemStack ingredient) {
List recipes = ThaumcraftApi.getCraftingRecipes();
for (int i = 0; i < recipes.size(); i++) {//Sorry, no enhanced for loop here again :P
if (recipes.get(i) instanceof ShapelessArcaneRecipe) {
ShapelessArcaneRecipe recipe = (ShapelessArcaneRecipe) recipes.get(i);
if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
for (Object o : recipe.getInput()) {
if (o instanceof ItemStack) {
ItemStack item = (ItemStack) o;
if (item.isItemEqual(ingredient)) {
if (checkDupe(recipe)) {
CachedShapelessArcaneWorkbenchRecipe r = new CachedShapelessArcaneWorkbenchRecipe(recipe);
r.prepVisuals();
r.setIngredientPermutation(r.inputs,ingredient);
this.arecipes.add(r);
}
}
}
}
}
}
}
}
示例9: getArcaneRecipe
import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
private static IArcaneRecipe getArcaneRecipe(String research)
{
for (Object recipe : ThaumcraftApi.getCraftingRecipes())
{
if (recipe instanceof IArcaneRecipe)
{
if (((IArcaneRecipe)recipe).getResearch().equals(research))
{
return (IArcaneRecipe) recipe;
}
}
}
return null;
}