Class ClientRecipeTransfer
java.lang.Object
com.example.uselocalrecipes.recipe.ClientRecipeTransfer
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 TypeMethodDescriptionstatic mezz.jei.api.recipe.transfer.IRecipeTransferErrortransfer(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)
-
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
-