PaperMC/paper-server/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch

27 lines
992 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- 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 static final Codec<RecipeItemStack> CODEC = codec(true);
public static final Codec<RecipeItemStack> CODEC_NONEMPTY = codec(false);
@@ -75,6 +76,15 @@
for (int j = 0; j < i; ++j) {
ItemStack itemstack1 = aitemstack[j];
+ // CraftBukkit start
+ if (exact) {
+ if (itemstack1.getItem() == itemstack.getItem() && ItemStack.isSameItemSameTags(itemstack, itemstack1)) {
+ return true;
+ }
+
+ continue;
+ }
+ // CraftBukkit end
if (itemstack1.is(itemstack.getItem())) {
return true;
}