public interface IRecipeTransferInfo<C extends net.minecraft.inventory.container.Container>
IRecipeTransferRegistration.addRecipeTransferHandler(Class, ResourceLocation, int, int, int, int)
.
Containers with slot ranges that contain gaps or other oddities can implement this interface directly.
Containers that need full control over the recipe transfer or do not use slots can implement IRecipeTransferHandler
.Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(C container)
Return true if this recipe transfer info can handle the given container instance.
|
java.lang.Class<C> |
getContainerClass()
Return the container class that this recipe transfer helper supports.
|
java.util.List<net.minecraft.inventory.container.Slot> |
getInventorySlots(C container)
Return a list of slots that the transfer can use to get items for crafting, or place leftover items.
|
net.minecraft.util.ResourceLocation |
getRecipeCategoryUid()
Return the recipe category that this container can handle.
|
java.util.List<net.minecraft.inventory.container.Slot> |
getRecipeSlots(C container)
Return a list of slots for the recipe area.
|
default boolean |
requireCompleteSets()
Return false if the recipe transfer should attempt to place as many items as possible for all slots, even if one slot has less.
|
java.lang.Class<C> getContainerClass()
net.minecraft.util.ResourceLocation getRecipeCategoryUid()
boolean canHandle(C container)
java.util.List<net.minecraft.inventory.container.Slot> getRecipeSlots(C container)
java.util.List<net.minecraft.inventory.container.Slot> getInventorySlots(C container)
default boolean requireCompleteSets()