From 07c0414f62934d686f5851ffac94880803ae309e Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Mon, 16 Dec 2019 11:45:08 -0600 Subject: [PATCH] Delete unused modcraftingrecipes --- .../common/crafting/ModCraftingRecipes.java | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java deleted file mode 100644 index 3d4321db2..000000000 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the Botania Mod. Get the Source Code in github: - * https://github.com/Vazkii/Botania - * - * Botania is Open Source and distributed under the - * Botania License: http://botaniamod.net/license.php - * - * File Created @ [Jan 19, 2014, 3:54:48 PM (GMT)] - */ -package vazkii.botania.common.crafting; - -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.server.ServerLifecycleHooks; -import vazkii.botania.common.Botania; -import vazkii.botania.common.lib.LibMisc; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ModCraftingRecipes { - - - public static void init() { - } - - private static ResourceLocation gogPath(String path) { - if(Botania.gardenOfGlassLoaded) { - return new ResourceLocation(LibMisc.MOD_ID, "garden_of_glass/" + path); - } else { - return path(path); - } - } - - private static ResourceLocation path(String path) { - return new ResourceLocation(LibMisc.MOD_ID, path); - } - - private static List allOfGroup(String group) { - return allOfGroup(new ResourceLocation(LibMisc.MOD_ID, group)); - } - - private static List allOfGroup(ResourceLocation group) { - MinecraftServer server = ServerLifecycleHooks.getCurrentServer(); - if(server == null) - return Collections.emptyList(); - String jsonGroup = group.toString(); - - return server.getRecipeManager().getRecipes(IRecipeType.CRAFTING) - .values() - .stream() - .filter(r -> jsonGroup.equals(r.getGroup())) - .map(IRecipe::getId) - .collect(Collectors.toList()); - } -}