Class RecipeSyncController

java.lang.Object
com.example.uselocalrecipes.runtime.RecipeSyncController

public final class RecipeSyncController extends Object
Waits for the recipes the server sends, reads recipes from local files in the meantime, then hands the merged result to the loader's client recipe synchronization.

Only remote servers are handled, the integrated server of a singleplayer world already owns the recipes. Everything runs on the client thread except the file reading, so joining a world does not stall.

  • Method Details

    • onClientJoin

      public static void onClientJoin()
    • onClientDisconnect

      public static void onClientDisconnect()
    • onClientTick

      public static void onClientTick()
    • isInjecting

      public static boolean isInjecting()
      Used by the platforms to ignore the sync events their own injection causes.
    • onServerRecipesReceived

      public static void onServerRecipesReceived(Set<net.minecraft.world.item.crafting.RecipeType<?>> types, net.minecraft.world.item.crafting.RecipeMap recipes)