@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/crafting/CraftingManager.java
|
||||
+++ b/net/minecraft/world/item/crafting/CraftingManager.java
|
||||
@@ -38,6 +38,11 @@
|
||||
@@ -39,6 +39,11 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class CraftingManager extends ResourceDataAbstract<RecipeMap> implements RecipeAccess {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -109,7 +114,25 @@
|
||||
@@ -111,7 +116,25 @@
|
||||
CraftingManager.LOGGER.info("Loaded {} recipes", recipemap.values().size());
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
List<SelectableRecipe.a<RecipeStonecutting>> list = new ArrayList();
|
||||
List<CraftingManager.b> list1 = CraftingManager.RECIPE_PROPERTY_SETS.entrySet().stream().map((entry) -> {
|
||||
return new CraftingManager.b((ResourceKey) entry.getKey(), (CraftingManager.c) entry.getValue());
|
||||
@@ -128,7 +151,7 @@
|
||||
@@ -130,7 +153,7 @@
|
||||
RecipeStonecutting recipestonecutting = (RecipeStonecutting) irecipe;
|
||||
|
||||
if (isIngredientEnabled(featureflagset, recipestonecutting.input()) && recipestonecutting.resultDisplay().isEnabled(featureflagset)) {
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +193,10 @@
|
||||
@@ -172,7 +195,10 @@
|
||||
}
|
||||
|
||||
public <I extends RecipeInput, T extends IRecipe<I>> Optional<RecipeHolder<T>> getRecipeFor(Recipes<T> recipes, I i0, World world) {
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
|
||||
public Optional<RecipeHolder<?>> byKey(ResourceKey<IRecipe<?>> resourcekey) {
|
||||
@@ -181,7 +207,7 @@
|
||||
@@ -183,7 +209,7 @@
|
||||
private <T extends IRecipe<?>> RecipeHolder<T> byKeyTyped(Recipes<T> recipes, ResourceKey<IRecipe<?>> resourcekey) {
|
||||
RecipeHolder<?> recipeholder = this.recipes.byKey(resourcekey);
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
|
||||
public Map<ResourceKey<RecipePropertySet>, RecipePropertySet> getSynchronizedItemProperties() {
|
||||
@@ -229,6 +255,22 @@
|
||||
@@ -231,6 +257,22 @@
|
||||
return new RecipeHolder<>(resourcekey, irecipe);
|
||||
}
|
||||
|
||||
|
||||
@@ -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