mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
8b26bb8f3e
By: md_5 <git@md-5.net>
26 lines
993 B
Diff
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;
|
|
}
|