当前位置: 首页>>代码示例>>Java>>正文


Java ShapelessOreRecipe.getRecipeOutput方法代码示例

本文整理汇总了Java中net.minecraftforge.oredict.ShapelessOreRecipe.getRecipeOutput方法的典型用法代码示例。如果您正苦于以下问题:Java ShapelessOreRecipe.getRecipeOutput方法的具体用法?Java ShapelessOreRecipe.getRecipeOutput怎么用?Java ShapelessOreRecipe.getRecipeOutput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.oredict.ShapelessOreRecipe的用法示例。


在下文中一共展示了ShapelessOreRecipe.getRecipeOutput方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: convert

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
public static JsonBrickOvenShapelessRecipe convert(ShapelessOreRecipe recipe)
{
	List<Object> inputs = new ArrayList<>();
	for (Object obj : recipe.getIngredients())
	{
		if (obj instanceof ItemStack)
		{
			inputs.add(obj);
		}
		else if (obj instanceof List)
		{
			try
			{
			    	@SuppressWarnings("unchecked")
				String ore = RegistryUtil.getCommonOreDictName((List<ItemStack>)obj);
				inputs.add(ore);
			}
			catch (ClassCastException ex)
			{
				LogUtil.log(Level.ERROR, "Failed to cast list in ore dictionary conversion: " + ex.toString());
			}
		}
	}

	return new JsonBrickOvenShapelessRecipe(recipe.getRecipeOutput(), inputs);
}
 
开发者ID:einsteinsci,项目名称:BetterBeginningsReborn,代码行数:27,代码来源:BrickOvenConfig.java

示例2: forgeShapelessRecipe

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
public CachedShapelessRecipe forgeShapelessRecipe(ShapelessOreRecipe recipe) {
    ArrayList<Object> items = recipe.getInput();

    for (Object item : items)
        if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores
            return null;

    return new CachedShapelessRecipe(items, recipe.getRecipeOutput());
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:ShapelessRecipeHandler.java

示例3: forgeShapelessRecipe

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
public CachedShapelessRecipe forgeShapelessRecipe(ShapelessOreRecipe recipe) {
    List<Object> items = recipe.getInput();

    for (Object item : items) {
        if (item instanceof List && ((List<?>) item).isEmpty())//ore handler, no ores
        {
            return null;
        }
    }

    return new CachedShapelessRecipe(items, recipe.getRecipeOutput());
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:13,代码来源:ShapelessRecipeHandler.java

示例4: getCachedOreRecipe

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
private CachedRollingMachineShapelessRecipe getCachedOreRecipe(ShapelessOreRecipe recipe, boolean genPerms) {
    ArrayList<Object> items = recipe.getInput();
    for (Object item : items) {
        if (item instanceof List && ((List<?>) item).isEmpty()) {
            return null;
        }
    }
    return new CachedRollingMachineShapelessRecipe(items, recipe.getRecipeOutput(), genPerms);
}
 
开发者ID:Tonius,项目名称:NEI-Integration,代码行数:10,代码来源:RecipeHandlerRollingMachineShapeless.java

示例5: AlwaysInvalidShapelessOreRecipe

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
public AlwaysInvalidShapelessOreRecipe(ShapelessOreRecipe dummy){
    super(new ResourceLocation(dummy.getGroup()), dummy.getIngredients(), dummy.getRecipeOutput());
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:4,代码来源:AlwaysInvalidShapelessRecipeFactory.java

示例6: parse

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
@Override
public IRecipe parse(JsonContext context, JsonObject json) {
    ShapelessOreRecipe recipe = ShapelessOreRecipe.factory(context, json);

    return new RemainBottleRecipe("mooncakecraft:remain_bottle", recipe.getRecipeOutput(), recipe.getIngredients());
}
 
开发者ID:TeamCovertDragon,项目名称:MooncakeCraft,代码行数:7,代码来源:RemainBottleRecipeFactory.java

示例7: recreateOreRecipe

import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
private static IRecipe recreateOreRecipe(ShapelessOreRecipe recipe,	Map<ItemStack, String> replacements) {
	Object[] ingredients = recipe.getInput().toArray();
	replaceIngredients(ingredients, replacements);
	return new ShapelessOreRecipe(recipe.getRecipeOutput(), ingredients);
}
 
开发者ID:lawremi,项目名称:PerFabricaAdAstra,代码行数:6,代码来源:RecipeUtils.java


注:本文中的net.minecraftforge.oredict.ShapelessOreRecipe.getRecipeOutput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。