RecipeManager: items are duplicated
frogglen opened this issue · 7 comments
Description
Well, I tried to make a new recipe with the RecipeManager plugin and I was able to do it correctly resulting in a named item and custom lore. The FastCraft plugin I take it and when obtaining the item from FastCraft, the ingredients do not consume them and you can do the crafting infinitely.
Server Details
- Server: Paper 1.15.2 #273
- FastCraft: v3.1.3
- RecipeManager: v2.22.1
Errors
the recipe i made was this:
craft
wheat + wheat + wheat
wheat + poisonous_potato + wheat
nether_wart + nether_wart + nether_wart
= wheat_seeds:0:5
@name Alimento Economico
@lore Rango Bajo
@lore Sirve para alimentar Mascotas Iniciales.
you can replicate it by placing it in the recipemanager recipe folder
It looks like RecipeManager is doing something weird with the crafting events
RecipeManager is cancelling the crafting (so FastCraft won't take the ingredients, and won't give the seeds), then it's giving the players seeds itself.
I'll try to figure out how to make that work correctly, but for now, I released v3.1.4 which disables the recipes from RecipeManager
It looks like RecipeManager is doing something weird with the crafting events
RecipeManager is cancelling the crafting (so FastCraft won't take the ingredients, and won't give the seeds), then it's giving the players seeds itself.
I'll try to figure out how to make that work correctly, but for now, I released v3.1.4 which disables the recipes from RecipeManager
thanks, i have temporarily disabled fastcraft on my server and will install the version you mention to me
RecipeManager handles the CraftItemEvent:
https://github.com/haveric/RecipeManager2/blob/8b3884a27bee3c268bb4e8a642383bee4be4835a/RecipeManager-base/src/main/java/haveric/recipeManager/recipes/WorkbenchEvents.java#L325
RecipeManager adds the result (seeds) to the player's inventory:
https://github.com/haveric/RecipeManager2/blob/8b3884a27bee3c268bb4e8a642383bee4be4835a/RecipeManager-base/src/main/java/haveric/recipeManager/recipes/WorkbenchEvents.java#L523
RecipeManager cancels the CraftItemEvent:
https://github.com/haveric/RecipeManager2/blob/8b3884a27bee3c268bb4e8a642383bee4be4835a/RecipeManager-base/src/main/java/haveric/recipeManager/recipes/WorkbenchEvents.java#L533
RecipeManager subtracts ingredients from the crafting grid:
https://github.com/haveric/RecipeManager2/blob/8b3884a27bee3c268bb4e8a642383bee4be4835a/RecipeManager-base/src/main/java/haveric/recipeManager/recipes/WorkbenchEvents.java#L540
#subtractIngredients(Inventory, ItemResult, boolean)
: