1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-28 17:27:20 +01:00

Fix recipe being always null in PrepareItemCraftEvent from the api ()

This commit is contained in:
Lulu13022002 2025-03-08 05:11:12 +01:00 committed by GitHub
parent 0a4eb8f3bb
commit 7a3d0c4e98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1725,6 +1725,7 @@ public final class CraftServer implements Server {
if (recipe.isPresent()) {
RecipeHolder<CraftingRecipe> recipeCrafting = recipe.get();
inventoryCrafting.setCurrentRecipe(recipeCrafting);
if (craftResult.setRecipeUsed(craftPlayer.getHandle(), recipeCrafting)) {
itemstack = recipeCrafting.value().assemble(inventoryCrafting.asCraftInput(), craftWorld.getHandle().registryAccess());
}