Class ClientRecipeTransfer

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

public final class ClientRecipeTransfer extends Object
Moves the ingredients of a recipe into a crafting container by simulating the clicks a player would do.

JEI normally has the server do the transfer, which needs JEI on the server as well. This fallback works like EMI's recipe transfer: the client decides where every item goes, the server only sees clicks.

  • Method Summary

    Modifier and Type
    Method
    Description
    static mezz.jei.api.recipe.transfer.IRecipeTransferError
    transfer(net.minecraft.world.inventory.AbstractContainerMenu container, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, net.minecraft.world.entity.player.Player player, boolean maxTransfer, boolean doTransfer, List<net.minecraft.world.inventory.Slot> craftingSlots, List<net.minecraft.world.inventory.Slot> inventorySlots, mezz.jei.api.helpers.IStackHelper stackHelper, mezz.jei.api.recipe.transfer.IRecipeTransferHandlerHelper handlerHelper)
     

    Methods inherited from class java.lang.Object

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

    • transfer

      public static mezz.jei.api.recipe.transfer.IRecipeTransferError transfer(net.minecraft.world.inventory.AbstractContainerMenu container, mezz.jei.api.gui.ingredient.IRecipeSlotsView recipeSlotsView, net.minecraft.world.entity.player.Player player, boolean maxTransfer, boolean doTransfer, List<net.minecraft.world.inventory.Slot> craftingSlots, List<net.minecraft.world.inventory.Slot> inventorySlots, mezz.jei.api.helpers.IStackHelper stackHelper, mezz.jei.api.recipe.transfer.IRecipeTransferHandlerHelper handlerHelper)
      Parameters:
      doTransfer - false to only check whether the transfer would work, used to preview the transfer button
      Returns:
      null when the transfer works (or would work), otherwise the error to show to the player