本文整理匯總了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);
}