PaperMC/paper-server/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch
CraftBukkit/Spigot 8b26bb8f3e Update to Minecraft 1.19.3
By: md_5 <git@md-5.net>
2022-12-08 03:00:00 +11:00

26 lines
993 B
Diff

--- a/net/minecraft/world/item/crafting/RecipeItemStack.java
+++ b/net/minecraft/world/item/crafting/RecipeItemStack.java
@@ -38,6 +38,7 @@
public ItemStack[] itemStacks;
@Nullable
private IntList stackingIds;
+ public boolean exact; // CraftBukkit
public RecipeItemStack(Stream<? extends RecipeItemStack.Provider> stream) {
this.values = (RecipeItemStack.Provider[]) stream.toArray((i) -> {
@@ -69,6 +70,15 @@
for (int j = 0; j < i; ++j) {
ItemStack itemstack1 = aitemstack[j];
+ // CraftBukkit start
+ if (exact) {
+ if (itemstack1.getItem() == itemstack.getItem() && ItemStack.tagMatches(itemstack, itemstack1)) {
+ return true;
+ }
+
+ continue;
+ }
+ // CraftBukkit end
if (itemstack1.is(itemstack.getItem())) {
return true;
}