當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。