本文整理汇总了Java中ic2.core.AdvRecipe类的典型用法代码示例。如果您正苦于以下问题:Java AdvRecipe类的具体用法?Java AdvRecipe怎么用?Java AdvRecipe使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AdvRecipe类属于ic2.core包,在下文中一共展示了AdvRecipe类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setCraftingRecipeOutput
import ic2.core.AdvRecipe; //导入依赖的package包/类
public static void setCraftingRecipeOutput(IRecipe iRecipe, ItemStack output) {
if (iRecipe instanceof ShapedRecipes) {
ReflectionHelper.setPrivateValue(ShapedRecipes.class,(ShapedRecipes)iRecipe, output, "field_77575_e"); // recipeOutput
} else if (iRecipe instanceof ShapelessRecipes) {
ReflectionHelper.setPrivateValue(ShapelessRecipes.class,(ShapelessRecipes)iRecipe, output, "field_77580_a"); // recipeOutput
} else if (iRecipe instanceof ShapelessOreRecipe) {
ReflectionHelper.setPrivateValue(ShapelessOreRecipe.class,(ShapelessOreRecipe)iRecipe, output, "output");
} else if (iRecipe instanceof ShapedOreRecipe) {
ReflectionHelper.setPrivateValue(ShapedOreRecipe.class,(ShapedOreRecipe)iRecipe, output, "output");
// IndustrialCraft^2
} else if (iRecipe instanceof AdvRecipe) {
// thanks IC2 for making this field public.. even if recipes aren't in the API
((AdvRecipe)iRecipe).output = output;
} else if (iRecipe instanceof AdvShapelessRecipe) {
((AdvShapelessRecipe)iRecipe).output = output;
}
}
开发者ID:agaricusb,项目名称:OreDupeFix,代码行数:19,代码来源:OreDupeFix.java
示例2: scan
import ic2.core.AdvRecipe; //导入依赖的package包/类
@Override
public void scan() {
for (IRecipe recipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
VanillaStackWrapper stackWrapper = new VanillaStackWrapper(recipe.getRecipeOutput());
if (recipe instanceof AdvRecipe) {
addRecipe(stackWrapper, getCachedRecipe(recipe));
} else if (recipe instanceof AdvShapelessRecipe) {
addRecipe(stackWrapper, getCachedRecipe(recipe));
}
}
}
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:12,代码来源:IC2CraftingScanner.java
示例3: getInput
import ic2.core.AdvRecipe; //导入依赖的package包/类
private Object[] getInput(IRecipe recipe) {
if (recipe instanceof AdvRecipe) {
return ((AdvRecipe) recipe).input;
} else if (recipe instanceof AdvShapelessRecipe) {
return ((AdvShapelessRecipe) recipe).input;
} else {
return new Object[0];
}
}
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:10,代码来源:IC2CraftingScanner.java
注:本文中的ic2.core.AdvRecipe类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论