|
6 | 6 | import gay.ampflower.mod.pet.util.Util; |
7 | 7 | import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; |
8 | 8 | import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; |
9 | | -import net.minecraft.data.server.recipe.CraftingRecipeJsonBuilder; |
10 | | -import net.minecraft.data.server.recipe.RecipeExporter; |
11 | | -import net.minecraft.data.server.recipe.RecipeProvider; |
12 | | -import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder; |
13 | | -import net.minecraft.data.server.recipe.SmithingTransformRecipeJsonBuilder; |
| 9 | +import net.minecraft.data.server.recipe.*; |
14 | 10 | import net.minecraft.item.Item; |
15 | 11 | import net.minecraft.item.ItemConvertible; |
16 | 12 | import net.minecraft.item.Items; |
@@ -48,6 +44,38 @@ public void generate(final RecipeExporter exporter) { |
48 | 44 | createCollarRecipe(PetworksItems.OBSIDIAN_COLLAR, Items.OBSIDIAN).offerTo(exporter); |
49 | 45 | createCollarRecipe(PetworksItems.BEDROCK_COLLAR, Items.BEDROCK).offerTo(exporter); |
50 | 46 |
|
| 47 | + createPrideCollarRecipe(PetworksItems.PRIDE_COLLAR,ItemTags.BANNERS,Dyes.RED,Dyes.ORANGE,Dyes.YELLOW,Dyes.GREEN,Dyes.BLUE,Dyes.PURPLE).offerTo(exporter); |
| 48 | + createPrideCollarRecipe(PetworksItems.PROGRESS_COLLAR,ItemTags.BANNERS,Dyes.RED,Dyes.ORANGE,Dyes.YELLOW,Dyes.GREEN,Dyes.BLUE,Dyes.PURPLE,Dyes.BLACK).offerTo(exporter); |
| 49 | + createPrideCollarRecipe(PetworksItems.TRANS_COLLAR,Items.EGG,Dyes.LIGHT_BLUE,Dyes.PINK,Dyes.WHITE,Dyes.LIGHT_BLUE,Dyes.PINK).offerTo(exporter); |
| 50 | + createPrideCollarRecipe(PetworksItems.GENDERQUEER_COLLAR,Items.GLASS_BOTTLE,Dyes.PURPLE,Dyes.WHITE,Dyes.GREEN).offerTo(exporter); |
| 51 | + createPrideCollarRecipe(PetworksItems.GENDERFLUID_COLLAR,Items.WATER_BUCKET,Dyes.PINK,Dyes.WHITE,Dyes.MAGENTA,Dyes.BLACK,Dyes.BLUE).offerTo(exporter); |
| 52 | + createPrideCollarRecipe(PetworksItems.AGENDER_COLLAR,Items.GLASS,Dyes.BLACK,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.LIME,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.BLACK).offerTo(exporter); |
| 53 | + createPrideCollarRecipe(PetworksItems.BIGENDER_COLLAR,Items.LEVER,Dyes.MAGENTA,Dyes.PINK,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.LIGHT_BLUE,Dyes.BLUE).offerTo(exporter); |
| 54 | + createPrideCollarRecipe(PetworksItems.DEMIBOY_1_COLLAR,Items.RAW_IRON,Dyes.GRAY,Dyes.LIGHT_GRAY,Dyes.LIGHT_BLUE,Dyes.WHITE,Dyes.LIGHT_BLUE,Dyes.LIGHT_GRAY,Dyes.GRAY).offerTo(exporter); |
| 55 | + createPrideCollarRecipe(PetworksItems.DEMIBOY_2_COLLAR,Items.RAW_IRON,Dyes.CYAN,Dyes.PURPLE,Dyes.WHITE,Dyes.GREEN,Dyes.CYAN).offerTo(exporter); |
| 56 | + createPrideCollarRecipe(PetworksItems.DEMIGENDER_COLLAR,Items.RAW_GOLD,Dyes.GRAY,Dyes.LIGHT_GRAY,Dyes.YELLOW,Dyes.WHITE,Dyes.YELLOW,Dyes.LIGHT_GRAY,Dyes.GRAY).offerTo(exporter); |
| 57 | + createPrideCollarRecipe(PetworksItems.DEMIGIRL_1_COLLAR,Items.RAW_COPPER,Dyes.GRAY,Dyes.LIGHT_GRAY,Dyes.PINK,Dyes.WHITE,Dyes.PINK,Dyes.LIGHT_GRAY,Dyes.GRAY).offerTo(exporter); |
| 58 | + createPrideCollarRecipe(PetworksItems.DEMIGIRL_2_COLLAR,Items.RAW_COPPER,Dyes.MAGENTA,Dyes.LIGHT_GRAY,Dyes.PINK,Dyes.WHITE,Dyes.PINK,Dyes.PINK,Dyes.GRAY).offerTo(exporter); |
| 59 | + createPrideCollarRecipe(PetworksItems.INTERSEX_1_COLLAR,Items.TORCH,Dyes.YELLOW,Dyes.YELLOW,Dyes.PURPLE).offerTo(exporter); |
| 60 | + createPrideCollarRecipe(PetworksItems.INTERSEX_2_COLLAR,Items.TORCH,Dyes.YELLOW,Dyes.PURPLE,Dyes.YELLOW,Dyes.PURPLE).offerTo(exporter); |
| 61 | + createPrideCollarRecipe(PetworksItems.NONBINARY_COLLAR,Items.AMETHYST_SHARD,Dyes.YELLOW,Dyes.WHITE,Dyes.PURPLE,Dyes.BLACK).offerTo(exporter); |
| 62 | + createPrideCollarRecipe(PetworksItems.ARO_COLLAR,Items.ARROW,Dyes.GREEN,Dyes.LIME,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.BLACK).offerTo(exporter); |
| 63 | + createPrideCollarRecipe(PetworksItems.DEMIROMANTIC_COLLAR,Items.STRING,Dyes.BLACK,Dyes.WHITE,Dyes.GREEN,Dyes.LIGHT_GRAY).offerTo(exporter); |
| 64 | + createPrideCollarRecipe(PetworksItems.ACE_COLLAR,Items.BREAD, Dyes.BLACK,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.PURPLE).offerTo(exporter); |
| 65 | + createPrideCollarRecipe(PetworksItems.DEMISEXUAL_COLLAR,Items.LEATHER,Dyes.BLACK,Dyes.WHITE,Dyes.PURPLE,Dyes.LIGHT_GRAY).offerTo(exporter); |
| 66 | + createPrideCollarRecipe(PetworksItems.AROACE_COLLAR,Items.TARGET,Dyes.ORANGE,Dyes.YELLOW,Dyes.WHITE,Dyes.LIGHT_BLUE,Dyes.BLUE).offerTo(exporter); |
| 67 | + createPrideCollarRecipe(PetworksItems.APLATONIC_COLLAR,Items.STONE_BUTTON,Dyes.PURPLE,Dyes.CYAN,Dyes.LIME,Dyes.YELLOW).offerTo(exporter); |
| 68 | + createPrideCollarRecipe(PetworksItems.GREYROSE_COLLAR,Items.ROSE_BUSH,Dyes.CYAN,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.CYAN).offerTo(exporter); |
| 69 | + createPrideCollarRecipe(PetworksItems.GREYACE_COLLAR,Items.FLINT,Dyes.PURPLE,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.PURPLE).offerTo(exporter); |
| 70 | + createPrideCollarRecipe(PetworksItems.GREYARO_COLLAR,Items.IRON_NUGGET,Dyes.GREEN,Dyes.LIGHT_GRAY,Dyes.WHITE,Dyes.LIGHT_GRAY,Dyes.GREEN).offerTo(exporter); |
| 71 | + createPrideCollarRecipe(PetworksItems.LESBIAN_COLLAR,Items.HONEYCOMB,Dyes.ORANGE,Dyes.ORANGE,Dyes.WHITE,Dyes.PINK,Dyes.MAGENTA).offerTo(exporter); |
| 72 | + createPrideCollarRecipe(PetworksItems.GAY_COLLAR,Items.STONE_BRICK_WALL,Dyes.GREEN,Dyes.LIME,Dyes.LIME,Dyes.WHITE,Dyes.LIGHT_BLUE,Dyes.LIGHT_BLUE,Dyes.BLUE).offerTo(exporter); |
| 73 | + createPrideCollarRecipe(PetworksItems.BISEXUAL_COLLAR,ItemTags.FENCE_GATES,Dyes.MAGENTA,Dyes.PURPLE,Dyes.BLUE).offerTo(exporter); |
| 74 | + createPrideCollarRecipe(PetworksItems.PAN_COLLAR,Items.CHEST,Dyes.PINK,Dyes.YELLOW,Dyes.LIGHT_BLUE).offerTo(exporter); |
| 75 | + createPrideCollarRecipe(PetworksItems.POLYAMORY_COLLAR,Items.BUNDLE,Items.GOLD_NUGGET,Dyes.WHITE,Dyes.LIGHT_BLUE,Dyes.RED,Dyes.PURPLE).offerTo(exporter); |
| 76 | + |
| 77 | + createSpecialCollarRecipe(PetworksItems.MISSING_COLLAR,Items.AMETHYST_SHARD,Items.OBSIDIAN).offerTo(exporter); |
| 78 | + |
51 | 79 | SmithingTransformRecipeJsonBuilder.create( |
52 | 80 | Ingredient.ofItems(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), |
53 | 81 | Ingredient.ofItems(PetworksItems.DIAMOND_COLLAR), |
@@ -145,4 +173,170 @@ private CraftingRecipeJsonBuilder createGuiseRecipe(ItemConvertible output) { |
145 | 173 | ) |
146 | 174 | ); |
147 | 175 | } |
| 176 | + |
| 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) { |
| 218 | + return ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, output) |
| 219 | + .input(PetworksItems.CLOTH_COLLAR) |
| 220 | + .input(catalyst) |
| 221 | + .input(flag1) |
| 222 | + .input(flag2) |
| 223 | + .input(flag3) |
| 224 | + .input(flag4) |
| 225 | + .input(flag5) |
| 226 | + .criterion(FabricRecipeProvider.hasItem(PetworksItems.CLOTH_COLLAR), FabricRecipeProvider.conditionsFromItem(PetworksItems.CLOTH_COLLAR)); |
| 227 | + } |
| 228 | + private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output, Item catalyst, Item flag1, Item flag2, Item flag3, Item flag4, Item flag5, Item flag6) { |
| 229 | + return ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, output) |
| 230 | + .input(PetworksItems.CLOTH_COLLAR) |
| 231 | + .input(catalyst) |
| 232 | + .input(flag1) |
| 233 | + .input(flag2) |
| 234 | + .input(flag3) |
| 235 | + .input(flag4) |
| 236 | + .input(flag5) |
| 237 | + .input(flag6) |
| 238 | + .criterion(FabricRecipeProvider.hasItem(PetworksItems.CLOTH_COLLAR), FabricRecipeProvider.conditionsFromItem(PetworksItems.CLOTH_COLLAR)); |
| 239 | + } |
| 240 | + private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output, Ingredient catalyst, Item flag1, Item flag2, Item flag3, Item flag4, Item flag5, Item flag6) { |
| 241 | + return ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, output) |
| 242 | + .input(PetworksItems.CLOTH_COLLAR) |
| 243 | + .input(catalyst) |
| 244 | + .input(flag1) |
| 245 | + .input(flag2) |
| 246 | + .input(flag3) |
| 247 | + .input(flag4) |
| 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 | + ); |
| 263 | + } |
| 264 | + private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output, Item catalyst, Item flag1, Item flag2, Item flag3, Item flag4, Item flag5, Item flag6, Item flag7) { |
| 265 | + return ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, output) |
| 266 | + .input(PetworksItems.CLOTH_COLLAR) |
| 267 | + .input(catalyst) |
| 268 | + .input(flag1) |
| 269 | + .input(flag2) |
| 270 | + .input(flag3) |
| 271 | + .input(flag4) |
| 272 | + .input(flag5) |
| 273 | + .input(flag6) |
| 274 | + .input(flag7) |
| 275 | + .criterion(FabricRecipeProvider.hasItem(PetworksItems.CLOTH_COLLAR), FabricRecipeProvider.conditionsFromItem(PetworksItems.CLOTH_COLLAR)); |
| 276 | + } |
| 277 | + private CraftingRecipeJsonBuilder createPrideCollarRecipe(ItemConvertible output, Ingredient catalyst, Item flag1, Item flag2, Item flag3, Item flag4, Item flag5, Item flag6, Item flag7) { |
| 278 | + return ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, output) |
| 279 | + .input(PetworksItems.CLOTH_COLLAR) |
| 280 | + .input(catalyst) |
| 281 | + .input(flag1) |
| 282 | + .input(flag2) |
| 283 | + .input(flag3) |
| 284 | + .input(flag4) |
| 285 | + .input(flag5) |
| 286 | + .input(flag6) |
| 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); |
| 311 | + } |
| 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 | + |
| 324 | + public final class Dyes { |
| 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; |
| 341 | + } |
148 | 342 | } |
0 commit comments