mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
apply the rest of the minecraft file patches \o/
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/world/item/crafting/Ingredient.java
|
||||
+++ b/net/minecraft/world/item/crafting/Ingredient.java
|
||||
@@ -36,6 +_,7 @@
|
||||
// CraftBukkit start
|
||||
@javax.annotation.Nullable
|
||||
private java.util.List<ItemStack> itemStacks;
|
||||
+ public Predicate<org.bukkit.inventory.ItemStack> predicate; // Purpur - Add predicate to recipe's ExactChoice ingredient
|
||||
|
||||
public boolean isExact() {
|
||||
return this.itemStacks != null;
|
||||
@@ -90,6 +_,11 @@
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Purpur start - Add predicate to recipe's ExactChoice ingredient
|
||||
+ if (predicate != null) {
|
||||
+ return predicate.test(stack.asBukkitCopy());
|
||||
+ }
|
||||
+ // Purpur end - Add predicate to recipe's ExactChoice ingredient
|
||||
return stack.is(this.values);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user