mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
[ci skip] inline fqn imports
This commit is contained in:
@@ -5,18 +5,10 @@ Subject: [PATCH] Add predicate to recipe's ExactChoice ingredient
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..5ec7d9dab1935bb743e3264d9f7390795fd9f55c 100644
|
||||
index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..81c563d44c311ea1b49425d93c57f46beb4a2ef9 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
@@ -10,6 +10,7 @@ import java.util.function.Predicate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable; // Purpur
|
||||
|
||||
/**
|
||||
* Represents a potential item match within a recipe. All choices within a
|
||||
@@ -180,6 +181,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -180,6 +180,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
public static class ExactChoice implements RecipeChoice {
|
||||
|
||||
private List<ItemStack> choices;
|
||||
@@ -24,7 +16,7 @@ index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..5ec7d9dab1935bb743e3264d9f739079
|
||||
|
||||
public ExactChoice(@NotNull ItemStack stack) {
|
||||
this(Arrays.asList(stack));
|
||||
@@ -229,6 +231,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -229,6 +230,7 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
|
||||
@Override
|
||||
public boolean test(@NotNull ItemStack t) {
|
||||
@@ -32,17 +24,17 @@ index 1cd6601c9d2e86ef850011fcb9e59811207b4af7..5ec7d9dab1935bb743e3264d9f739079
|
||||
for (ItemStack match : choices) {
|
||||
if (t.isSimilar(match)) {
|
||||
return true;
|
||||
@@ -238,6 +241,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -238,6 +240,17 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Nullable
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ public Predicate<ItemStack> getPredicate() {
|
||||
+ return predicate;
|
||||
+ }
|
||||
+
|
||||
+ public void setPredicate(@Nullable Predicate<ItemStack> predicate) {
|
||||
+ public void setPredicate(@org.jetbrains.annotations.Nullable Predicate<ItemStack> predicate) {
|
||||
+ this.predicate = predicate;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
|
||||
Reference in New Issue
Block a user