public interface IRecipeTransferHandler<C extends net.minecraft.inventory.container.Container>
IRecipeTransferInfo
instead, which is much simpler.
Useful functions for implementing a recipe transfer handler can be found in IRecipeTransferHandlerHelper
.
To register your recipe transfer handler, use IRecipeTransferRegistration.addRecipeTransferHandler(IRecipeTransferHandler, ResourceLocation)
Modifier and Type | Method and Description |
---|---|
java.lang.Class<C> |
getContainerClass()
The container that this recipe transfer handler can use.
|
default IRecipeTransferError |
transferRecipe(C container,
IRecipeLayout recipeLayout,
net.minecraft.entity.player.PlayerEntity player,
boolean maxTransfer,
boolean doTransfer)
Deprecated.
since JEI 7.1.3. Use
transferRecipe(Container, Object, IRecipeLayout, PlayerEntity, boolean, boolean) |
default IRecipeTransferError |
transferRecipe(C container,
java.lang.Object recipe,
IRecipeLayout recipeLayout,
net.minecraft.entity.player.PlayerEntity player,
boolean maxTransfer,
boolean doTransfer) |
java.lang.Class<C> getContainerClass()
@Nullable default IRecipeTransferError transferRecipe(C container, java.lang.Object recipe, IRecipeLayout recipeLayout, net.minecraft.entity.player.PlayerEntity player, boolean maxTransfer, boolean doTransfer)
container
- the container to act onrecipe
- the raw recipe instancerecipeLayout
- the layout of the recipe, with information about the ingredientsplayer
- the player, to do the slot manipulationmaxTransfer
- if true, transfer as many items as possible. if false, transfer one setdoTransfer
- if true, do the transfer. if false, check for errors but do not actually transfer the items@Deprecated @Nullable default IRecipeTransferError transferRecipe(C container, IRecipeLayout recipeLayout, net.minecraft.entity.player.PlayerEntity player, boolean maxTransfer, boolean doTransfer)
transferRecipe(Container, Object, IRecipeLayout, PlayerEntity, boolean, boolean)
container
- the container to act onrecipeLayout
- the layout of the recipe, with information about the ingredientsplayer
- the player, to do the slot manipulationmaxTransfer
- if true, transfer as many items as possible. if false, transfer one setdoTransfer
- if true, do the transfer. if false, check for errors but do not actually transfer the items