-
-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Craft special cases : handle custom recipes and not consumed items #222
Comments
We should test the proxy with a bukkit plugin like http://dev.bukkit.org/bukkit-plugins/recipemanager/ to figure out how it's done. |
Also consider "container" items, e.g., milk bucket's container = empty bucket, returned from crafting cake http://minecraft.gamepedia.com/Cake |
Yeah so.. I finally understoof what is "outShape" in recipes.json So, it should be checked if there is an outShape there https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/inventory.js#L572 and I think that will handle all the cases we are talking about in that issue. |
So, it would be nice to test if we can craft a cake. It that works, this issue is half-done. |
Ok crafting a cake works. |
Is it possible to get a "written book" by the creative inventory ? it doesn't seem there so I can't test whether that recipe would work. |
creative api can probably give you everything, since it's how the normal client simply moves items around. |
Also what about firework crafting recipes (according to http://minecraft.gamepedia.com/Fireworks "firework rocket is one of the few items in the game that cannot be taken directly out of a creative inventory") and item repair recipes (combining two damaged tools) |
I meant "creative inventory" not creative API, ie I don't know how to give myself a written book in the actual game. I'll try the firework recipe. "item repair recipe" is not an actual recipe, so it shouldn't be in the recipes.json, maybe it should be stored elsewhere or just computed an other way (the rule is " Two items of the same type and material can be placed anywhere on the crafting grid, and the result is a single repaired item. ") and there should be an other method than bot.craft to do it, maybe bot.repair or something. |
crafting fireworks works. |
I'd better have an automatic test for this though (see #239 (comment)) instead of testing manually. |
You can use commands: /give player minecraft:written_book 1 0 {author:'Player', title:'title1', resolved:1, generation:0, pages: ['hi']} |
Ok that worked. That recipe is broken in mineflayer, the reason is this recipe has ingredients and "outIngredients", which is not handled by mineflayer (and minecraft-data). |
Recipes with metadata (even the simplest one like "white" log --> "white" wood) are broken. The problem is likely in the data, fixing this depends on PrismarineJS/minecraft-data#7 Also : it would be nice to know which recipe is broken and which is not (see #239) |
with 1.17 (note:it may have happened before 1.17) but containers like bottles that are used eg: if i make a recipie that turns a honey bottle into a potato the bottle will remain but we still can't control witch item is consumed but its a start i suppose :P |
Currently it is assumed that all the blocks used in a recipe are consumed (https://github.com/andrewrk/mineflayer/blob/master/lib/plugins/inventory.js#L572).
It is not true for all recipes (see http://minecraft.gamepedia.com/Written_Book )
So it should be handled by mineflayer :
Custom recipes are related to this consumption/not consumption
The text was updated successfully, but these errors were encountered: