Removed now deprecated additional Methods
This commit is contained in:
parent
5e557f95c0
commit
bc4f542e41
1 changed files with 0 additions and 47 deletions
|
@ -6,7 +6,6 @@ import net.minecraft.core.Registry;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.item.TieredItem;
|
|
||||||
import net.minecraft.world.item.crafting.Recipe;
|
import net.minecraft.world.item.crafting.Recipe;
|
||||||
import net.minecraft.world.item.crafting.RecipeSerializer;
|
import net.minecraft.world.item.crafting.RecipeSerializer;
|
||||||
import net.minecraft.world.item.crafting.RecipeType;
|
import net.minecraft.world.item.crafting.RecipeType;
|
||||||
|
@ -59,52 +58,6 @@ public class BCLRecipeManager {
|
||||||
list.put(recipe.getId(), recipe);
|
list.put(recipe.getId(), recipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(forRemoval = true)
|
|
||||||
public static <C extends Container, T extends Recipe<C>> void addRecipeAndCreateAdvancement(
|
|
||||||
RecipeType<T> type,
|
|
||||||
T recipe
|
|
||||||
) {
|
|
||||||
addRecipe(type, recipe);
|
|
||||||
registerAndCreateAdvancement(recipe, recipe.getResultItem().getItem() instanceof TieredItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated(forRemoval = true)
|
|
||||||
public static <C extends Container, T extends Recipe<C>> void addRecipeAndCreateAdvancement(
|
|
||||||
RecipeType<T> type,
|
|
||||||
T recipe,
|
|
||||||
boolean isTool
|
|
||||||
) {
|
|
||||||
addRecipe(type, recipe);
|
|
||||||
registerAndCreateAdvancement(recipe, isTool);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated(forRemoval = true)
|
|
||||||
public static <C extends Container, T extends Recipe<C>> ResourceLocation registerAndCreateAdvancement(
|
|
||||||
T recipe,
|
|
||||||
boolean isTool
|
|
||||||
) {
|
|
||||||
return recipe.getId();
|
|
||||||
// AdvancementManager.Builder b = AdvancementManager.Builder.createRecipe(
|
|
||||||
// recipe,
|
|
||||||
// isTool
|
|
||||||
// ? AdvancementManager.AdvancementType.RECIPE_TOOL
|
|
||||||
// : AdvancementManager.AdvancementType.RECIPE_DECORATIONS
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// int ct = 0;
|
|
||||||
// for (Ingredient ingredient : recipe.getIngredients()) {
|
|
||||||
// for (ItemStack stack : ingredient.getItems()) {
|
|
||||||
// if (stack.is(Items.AIR)) continue;
|
|
||||||
//
|
|
||||||
// final String name = "has_" + ct++;
|
|
||||||
// Item item = stack.getItem();
|
|
||||||
// b.addInventoryChangedCriterion(name, item);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return b.buildAndRegister();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <C extends Container, T extends Recipe<C>> T getRecipe(RecipeType<T> type, ResourceLocation id) {
|
public static <C extends Container, T extends Recipe<C>> T getRecipe(RecipeType<T> type, ResourceLocation id) {
|
||||||
Map<ResourceLocation, T> map = BCLRecipeManager.<C, T>RECIPES().get(type);
|
Map<ResourceLocation, T> map = BCLRecipeManager.<C, T>RECIPES().get(type);
|
||||||
return map != null ? map.get(id) : null;
|
return map != null ? map.get(id) : null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue