mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
By: md_5 <git@md-5.net>
This commit is contained in:
parent
f4f370e55e
commit
5165e97c74
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+ itemstack = org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(inventorycrafting, inventorycraftresult, itemstack, container.getBukkitView(), optional.map(RecipeHolder::toBukkitRecipe).orElse(null) instanceof RecipeRepair); // CraftBukkit
|
+ itemstack = org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(inventorycrafting, inventorycraftresult, itemstack, container.getBukkitView(), optional.map(RecipeHolder::value).orElse(null) instanceof RecipeRepair); // CraftBukkit
|
||||||
|
|
||||||
inventorycraftresult.setItem(0, itemstack);
|
inventorycraftresult.setItem(0, itemstack);
|
||||||
container.setRemoteSlot(0, itemstack);
|
container.setRemoteSlot(0, itemstack);
|
||||||
|
|
|
@ -1416,7 +1416,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call Bukkit event to check for matrix/result changes.
|
// Call Bukkit event to check for matrix/result changes.
|
||||||
net.minecraft.world.item.ItemStack result = CraftEventFactory.callPreCraftEvent(inventoryCrafting, craftResult, itemstack, container.getBukkitView(), recipe.map(RecipeHolder::toBukkitRecipe).orElse(null) instanceof RecipeRepair);
|
net.minecraft.world.item.ItemStack result = CraftEventFactory.callPreCraftEvent(inventoryCrafting, craftResult, itemstack, container.getBukkitView(), recipe.map(RecipeHolder::value).orElse(null) instanceof RecipeRepair);
|
||||||
|
|
||||||
return createItemCraftResult(CraftItemStack.asBukkitCopy(result), inventoryCrafting, craftWorld.getHandle());
|
return createItemCraftResult(CraftItemStack.asBukkitCopy(result), inventoryCrafting, craftWorld.getHandle());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue