Class RecipeMerger

java.lang.Object
com.example.uselocalrecipes.recipe.RecipeMerger

public final class RecipeMerger extends Object
Combines the recipes the server sent with the recipes that were read from local files.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.crafting.RecipeMap
    merge(net.minecraft.world.item.crafting.RecipeMap serverRecipes, Set<net.minecraft.world.item.crafting.RecipeType<?>> serverTypes, net.minecraft.world.item.crafting.RecipeMap localRecipes, boolean preferServerTypes)
    Deduplicates by id with the server always winning.
    static Set<net.minecraft.world.item.crafting.RecipeType<?>>
    typesOf(net.minecraft.world.item.crafting.RecipeMap recipes)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • merge

      public static net.minecraft.world.item.crafting.RecipeMap merge(net.minecraft.world.item.crafting.RecipeMap serverRecipes, Set<net.minecraft.world.item.crafting.RecipeType<?>> serverTypes, net.minecraft.world.item.crafting.RecipeMap localRecipes, boolean preferServerTypes)
      Deduplicates by id with the server always winning. With preferServerTypes, locally read recipes of a type the server sent are dropped, the server knows that type better.
    • typesOf

      public static Set<net.minecraft.world.item.crafting.RecipeType<?>> typesOf(net.minecraft.world.item.crafting.RecipeMap recipes)