craftbukkit/nms-patches/net/minecraft/world/item/crafting/RecipeItemStack.patch

27 lines
993 B
Diff
Raw Normal View History

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