@@ -1,9 +1,21 @@
|
||||
--- a/net/minecraft/world/item/crafting/RecipeItemStack.java
|
||||
+++ b/net/minecraft/world/item/crafting/RecipeItemStack.java
|
||||
@@ -42,6 +42,24 @@
|
||||
@@ -21,6 +21,11 @@
|
||||
import net.minecraft.world.item.crafting.display.SlotDisplay;
|
||||
import net.minecraft.world.level.IMaterial;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import javax.annotation.Nullable;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public final class RecipeItemStack implements AutoRecipeStackManager.a<Holder<Item>>, Predicate<ItemStack> {
|
||||
|
||||
public static final StreamCodec<RegistryFriendlyByteBuf, RecipeItemStack> CONTENTS_STREAM_CODEC = ByteBufCodecs.holderSet(Registries.ITEM).map(RecipeItemStack::new, (recipeitemstack) -> {
|
||||
@@ -38,6 +43,24 @@
|
||||
return recipeitemstack.values;
|
||||
});
|
||||
private final HolderSet<Item> values;
|
||||
@Nullable
|
||||
private List<Holder<Item>> items;
|
||||
+ // CraftBukkit start
|
||||
+ @Nullable
|
||||
+ private List<ItemStack> itemStacks;
|
||||
@@ -25,7 +37,7 @@
|
||||
|
||||
private RecipeItemStack(HolderSet<Item> holderset) {
|
||||
holderset.unwrap().ifRight((list) -> {
|
||||
@@ -72,6 +90,17 @@
|
||||
@@ -70,6 +93,17 @@
|
||||
}
|
||||
|
||||
public boolean test(ItemStack itemstack) {
|
||||
@@ -40,10 +52,10 @@
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
List<Holder<Item>> list = this.items();
|
||||
return itemstack.is(this.values);
|
||||
}
|
||||
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
@@ -85,7 +114,7 @@
|
||||
@@ -79,7 +113,7 @@
|
||||
|
||||
public boolean equals(Object object) {
|
||||
if (object instanceof RecipeItemStack recipeitemstack) {
|
||||
|
||||
Reference in New Issue
Block a user