2019-01-02 05:56:21 +01:00
|
|
|
--- a/net/minecraft/server/RecipeItemStack.java
|
|
|
|
+++ b/net/minecraft/server/RecipeItemStack.java
|
2020-06-25 02:00:00 +02:00
|
|
|
@@ -25,6 +25,7 @@
|
|
|
|
private final RecipeItemStack.Provider[] b;
|
2019-01-02 05:56:21 +01:00
|
|
|
public ItemStack[] choices;
|
2020-06-25 02:00:00 +02:00
|
|
|
private IntList d;
|
2019-01-02 05:56:21 +01:00
|
|
|
+ public boolean exact; // CraftBukkit
|
|
|
|
|
|
|
|
public RecipeItemStack(Stream<? extends RecipeItemStack.Provider> stream) {
|
2020-06-25 02:00:00 +02:00
|
|
|
this.b = (RecipeItemStack.Provider[]) stream.toArray((i) -> {
|
|
|
|
@@ -57,6 +58,15 @@
|
|
|
|
for (int j = 0; j < i; ++j) {
|
|
|
|
ItemStack itemstack1 = aitemstack[j];
|
2019-01-02 05:56:21 +01:00
|
|
|
|
2020-06-25 02:00:00 +02:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (exact) {
|
|
|
|
+ if (itemstack1.getItem() == itemstack.getItem() && ItemStack.equals(itemstack, itemstack1)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
2019-01-02 05:56:21 +01:00
|
|
|
+
|
2020-06-25 02:00:00 +02:00
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
if (itemstack1.getItem() == itemstack.getItem()) {
|
|
|
|
return true;
|
|
|
|
}
|