JEI version: 3.13.6.387 for MC 1.10.2
I've created a JEI plugin to wrap a couple of custom (simple shaped workbench crafting) recipes in my mod, and generally it's working very well. One minor issue, though: the "Move Items" button is wedged in the bottom right corner of the drawable panel, and no combination of co-ordinates to IRecipeLayout#setRecipeTransferButton() seems to move it. Not a huge deal, since the button works fine, but definitely a cosmetic annoyance - I'd like the button to be near the output slot, similar to vanilla crafting recipes.
Example of what it looks like right now: http://imgur.com/a/8JE7x
Am I doing something really dumb here, or is there an actual issue?
On a related note, I had to do this
registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerWorkbench.class, ModularRouters.modId + ".moduleEnhancement", 1, 9, 10, 36);
to have the "Move Items" button shown at all, and that only works for vanilla crafting tables. Is there a general way to support item transfer to any (modded) crafting inventory e.g. RFTools crafter, EnderIO crafter etc.? Bearing in mind that my wrapped recipe is just a (subclass of) ShapedOreRecipe?
Update: just tested with an older version of JEI - 3.12.8.323 - and the "Move Items" button _does_ appear to be positioned correctly. So, possible bug in a newer JEI release?
The button should move, seems like you found a bug.
However I recommend using the normal crafting recipe category and adding your extra information to the output item's tooltip instead. It's much more compatible that way. You don't have to create your own category, or transfer handler, and it will work with all modded crafting table transfer handlers.
Thanks for that. Just one question regarding using the normal crafting category: do you mean to simply not register a custom category at all, and return VanillaRecipeCategoryUid.CRAFTING from my handler's getRecipeCategoryUid() method? If I do that, it works, but how would I then add tooltips? Right now, I have my wrapper class implement ITooltipCallback
(The reason I wanted to do this via a custom category is to make it as clear as possible what the "enhancement" crafting does to my module items - I've had feedback from users that it wasn't very clear, which I'm inclined to agree with).
Yes just return the vanilla crafting UID. There are several types of special handling for adding your own crafting recipes to that category with extra control. You probably want to implement ICustomCraftingRecipeWrapper. You can see more info in the documentation there.
Most helpful comment
Yes just return the vanilla crafting UID. There are several types of special handling for adding your own crafting recipes to that category with extra control. You probably want to implement
ICustomCraftingRecipeWrapper. You can see more info in the documentation there.