本文整理汇总了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);
}
示例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());
}
示例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());
}
示例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);
}
示例5: AlwaysInvalidShapelessOreRecipe
import net.minecraftforge.oredict.ShapelessOreRecipe; //导入方法依赖的package包/类
public AlwaysInvalidShapelessOreRecipe(ShapelessOreRecipe dummy){
super(new ResourceLocation(dummy.getGroup()), dummy.getIngredients(), dummy.getRecipeOutput());
}
示例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());
}
示例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);
}