@@ -74,6 +74,8 @@ public void generate(final RecipeExporter exporter) {
7474 createPrideCollarRecipe (PetworksItems .PAN_COLLAR ,Items .CHEST ,Dyes .PINK ,Dyes .YELLOW ,Dyes .LIGHT_BLUE ).offerTo (exporter );
7575 createPrideCollarRecipe (PetworksItems .POLYAMORY_COLLAR ,Items .BUNDLE ,Items .GOLD_NUGGET ,Dyes .WHITE ,Dyes .LIGHT_BLUE ,Dyes .RED ,Dyes .PURPLE ).offerTo (exporter );
7676
77+ createSpecialCollarRecipe (PetworksItems .MISSING_COLLAR ,Items .AMETHYST_SHARD ,Items .OBSIDIAN ).offerTo (exporter );
78+
7779 SmithingTransformRecipeJsonBuilder .create (
7880 Ingredient .ofItems (Items .NETHERITE_UPGRADE_SMITHING_TEMPLATE ),
7981 Ingredient .ofItems (PetworksItems .DIAMOND_COLLAR ),
@@ -172,34 +174,94 @@ private CraftingRecipeJsonBuilder createGuiseRecipe(ItemConvertible output) {
172174 );
173175 }
174176
175- private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Ingredient flag1 , Ingredient flag2 , Ingredient flag3 ) {
177+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Item catalyst , Item flag1 , Item flag2 , Item flag3 ) {
178+ return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
179+ .input (PetworksItems .CLOTH_COLLAR )
180+ .input (catalyst )
181+ .input (flag1 )
182+ .input (flag2 )
183+ .input (flag3 )
184+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
185+ }
186+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Item flag1 , Item flag2 , Item flag3 ) {
187+ return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
188+ .input (PetworksItems .CLOTH_COLLAR )
189+ .input (catalyst )
190+ .input (flag1 )
191+ .input (flag2 )
192+ .input (flag3 )
193+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
194+ }
195+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , TagKey <Item > catalyst , Item flag1 , Item flag2 , Item flag3 ) {
196+ return createPrideCollarRecipe (output , Ingredient .fromTag (catalyst ),flag1 ,flag2 ,flag3 )
197+ .criterion ("has_materials" ,
198+ RecipeProvider .conditionsFromItemPredicates (
199+ ItemPredicate .Builder
200+ .create ()
201+ .items (Items .STRING )
202+ .tag (catalyst )
203+ .build ()
204+ )
205+ );
206+ }
207+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Item catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 ) {
208+ return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
209+ .input (PetworksItems .CLOTH_COLLAR )
210+ .input (catalyst )
211+ .input (flag1 )
212+ .input (flag2 )
213+ .input (flag3 )
214+ .input (flag4 )
215+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
216+ }
217+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Item catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 ) {
176218 return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
177219 .input (PetworksItems .CLOTH_COLLAR )
178220 .input (catalyst )
179221 .input (flag1 )
180222 .input (flag2 )
181- .input (flag3 );
223+ .input (flag3 )
224+ .input (flag4 )
225+ .input (flag5 )
226+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
182227 }
183- private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Ingredient flag1 , Ingredient flag2 , Ingredient flag3 , Ingredient flag4 ) {
228+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Item catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 ) {
184229 return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
185230 .input (PetworksItems .CLOTH_COLLAR )
186231 .input (catalyst )
187232 .input (flag1 )
188233 .input (flag2 )
189234 .input (flag3 )
190- .input (flag4 );
235+ .input (flag4 )
236+ .input (flag5 )
237+ .input (flag6 )
238+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
191239 }
192- private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Ingredient flag1 , Ingredient flag2 , Ingredient flag3 , Ingredient flag4 , Ingredient flag5 ) {
240+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 ) {
193241 return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
194242 .input (PetworksItems .CLOTH_COLLAR )
195243 .input (catalyst )
196244 .input (flag1 )
197245 .input (flag2 )
198246 .input (flag3 )
199247 .input (flag4 )
200- .input (flag5 );
248+ .input (flag5 )
249+ .input (flag6 )
250+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
251+ }
252+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , TagKey <Item > catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 ) {
253+ return createPrideCollarRecipe (output , Ingredient .fromTag (catalyst ),flag1 ,flag2 ,flag3 ,flag4 ,flag5 ,flag6 )
254+ .criterion ("has_materials" ,
255+ RecipeProvider .conditionsFromItemPredicates (
256+ ItemPredicate .Builder
257+ .create ()
258+ .items (Items .STRING )
259+ .tag (catalyst )
260+ .build ()
261+ )
262+ );
201263 }
202- private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Ingredient flag1 , Ingredient flag2 , Ingredient flag3 , Ingredient flag4 , Ingredient flag5 , Ingredient flag6 ) {
264+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Item catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 , Item flag7 ) {
203265 return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
204266 .input (PetworksItems .CLOTH_COLLAR )
205267 .input (catalyst )
@@ -208,9 +270,11 @@ private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output
208270 .input (flag3 )
209271 .input (flag4 )
210272 .input (flag5 )
211- .input (flag6 );
273+ .input (flag6 )
274+ .input (flag7 )
275+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
212276 }
213- private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Ingredient flag1 , Ingredient flag2 , Ingredient flag3 , Ingredient flag4 , Ingredient flag5 , Ingredient flag6 , Ingredient flag7 ) {
277+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , Ingredient catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 , Item flag7 ) {
214278 return ShapelessRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
215279 .input (PetworksItems .CLOTH_COLLAR )
216280 .input (catalyst )
@@ -220,24 +284,59 @@ private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output
220284 .input (flag4 )
221285 .input (flag5 )
222286 .input (flag6 )
223- .input (flag7 );
287+ .input (flag7 )
288+ .criterion (FabricRecipeProvider .hasItem (PetworksItems .CLOTH_COLLAR ), FabricRecipeProvider .conditionsFromItem (PetworksItems .CLOTH_COLLAR ));
289+ }
290+ private CraftingRecipeJsonBuilder createPrideCollarRecipe (ItemConvertible output , TagKey <Item > catalyst , Item flag1 , Item flag2 , Item flag3 , Item flag4 , Item flag5 , Item flag6 ,Item flag7 ) {
291+ return createPrideCollarRecipe (output , Ingredient .fromTag (catalyst ),flag1 ,flag2 ,flag3 ,flag4 ,flag5 ,flag6 ,flag7 )
292+ .criterion ("has_materials" ,
293+ RecipeProvider .conditionsFromItemPredicates (
294+ ItemPredicate .Builder
295+ .create ()
296+ .items (Items .STRING )
297+ .tag (catalyst )
298+ .build ()
299+ )
300+ );
301+ }
302+ private CraftingRecipeJsonBuilder createSpecialCollarRecipe (ItemConvertible output , Ingredient input1 , Ingredient input2 ) {
303+ return ShapedRecipeJsonBuilder .create (RecipeCategory .COMBAT , output )
304+ .input ('1' , input1 )
305+ .input ('2' , input2 )
306+ .input ('S' , Items .STRING )
307+ .pattern ("S1 " )
308+ .pattern ("2 2" )
309+ .pattern (" 1S" )
310+ .showNotification (false );
224311 }
312+ private CraftingRecipeJsonBuilder createSpecialCollarRecipe (ItemConvertible output , Item input1 , Item input2 ) {
313+ return createSpecialCollarRecipe (output , Ingredient .ofItems (input1 ), Ingredient .ofItems (input2 ))
314+ .criterion ("has_materials" ,
315+ RecipeProvider .conditionsFromItemPredicates (
316+ ItemPredicate .Builder
317+ .create ()
318+ .items (Items .STRING , input1 , input2 )
319+ .build ()
320+ )
321+ );
322+ }
323+
225324 public final class Dyes {
226- public static final Ingredient RED = Items .RED_DYE ;
227- public static final Ingredient ORANGE = Items .ORANGE_DYE ;
228- public static final Ingredient YELLOW = Items .YELLOW_DYE ;
229- public static final Ingredient GREEN = Items .GREEN_DYE ;
230- public static final Ingredient LIME = Items .LIME_DYE ;
231- public static final Ingredient LIGHT_BLUE = Items .LIGHT_BLUE_DYE ;
232- public static final Ingredient CYAN = Items .CYAN_DYE ;
233- public static final Ingredient BLUE = Items .BLUE_DYE ;
234- public static final Ingredient PURPLE = Items .PURPLE_DYE ;
235- public static final Ingredient MAGENTA = Items .MAGENTA_DYE ;
236- public static final Ingredient PINK = Items .PINK_DYE ;
237- public static final Ingredient WHITE = Items .WHITE_DYE ;
238- public static final Ingredient LIGHT_GRAY = Items .LIGHT_GRAY_DYE ;
239- public static final Ingredient GRAY = Items .GRAY_DYE ;
240- public static final Ingredient BLACK = Items .BLACK_DYE ;
241- public static final Ingredient BROWN = Items .BROWN_DYE ;
325+ public static final Item RED = Items .RED_DYE ;
326+ public static final Item ORANGE = Items .ORANGE_DYE ;
327+ public static final Item YELLOW = Items .YELLOW_DYE ;
328+ public static final Item GREEN = Items .GREEN_DYE ;
329+ public static final Item LIME = Items .LIME_DYE ;
330+ public static final Item LIGHT_BLUE = Items .LIGHT_BLUE_DYE ;
331+ public static final Item CYAN = Items .CYAN_DYE ;
332+ public static final Item BLUE = Items .BLUE_DYE ;
333+ public static final Item PURPLE = Items .PURPLE_DYE ;
334+ public static final Item MAGENTA = Items .MAGENTA_DYE ;
335+ public static final Item PINK = Items .PINK_DYE ;
336+ public static final Item WHITE = Items .WHITE_DYE ;
337+ public static final Item LIGHT_GRAY = Items .LIGHT_GRAY_DYE ;
338+ public static final Item GRAY = Items .GRAY_DYE ;
339+ public static final Item BLACK = Items .BLACK_DYE ;
340+ public static final Item BROWN = Items .BROWN_DYE ;
242341 }
243342}
0 commit comments