feat: Add blahaj recipes

*technically a fix*
This commit is contained in:
Ampflower 🌺 2025-03-14 04:13:41 -07:00
parent 74a44d8e9b
commit a18c08039b
No known key found for this signature in database
GPG Key ID: FC0397C90D508D7F
58 changed files with 45 additions and 856 deletions

View File

@ -1,9 +1,11 @@
package gay.pridecraft.joy.data;
import gay.pridecraft.joy.block.BlahajBlocks;
import gay.pridecraft.joy.registry.JoyItems;
import gay.pridecraft.joy.tags.JoyItemTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.registry.RegistryWrapper;
@ -31,5 +33,16 @@ public class JoyItemTagProvider extends FabricTagProvider.ItemTagProvider {
Items.TOTEM_OF_UNDYING,
JoyItems.TOTEM_OF_PRIDE
);
getOrCreateTagBuilder(JoyItemTags.SHARKS).add(
BlahajBlocks.BLAHAJ_ITEM,
BlahajBlocks.GRAY_SHARK_ITEM
).add(BlahajBlocks.PRIDE_ITEMS.toArray(Item[]::new));
getOrCreateTagBuilder(JoyItemTags.PLUSHIES).add(
BlahajBlocks.BLAVINGAD_ITEM,
BlahajBlocks.BREAD_ITEM,
BlahajBlocks.BROWN_BEAR_ITEM
).addTag(JoyItemTags.SHARKS);
}
}

View File

@ -1,16 +1,21 @@
package gay.pridecraft.joy.data;
import gay.pridecraft.joy.block.BlahajBlocks;
import gay.pridecraft.joy.registry.JoyBlocks;
import gay.pridecraft.joy.tags.JoyItemTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import net.minecraft.data.server.recipe.RecipeExporter;
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
import net.minecraft.data.server.recipe.StonecuttingRecipeJsonBuilder;
import net.minecraft.item.Item;
import net.minecraft.item.ItemConvertible;
import net.minecraft.item.Items;
import net.minecraft.recipe.Ingredient;
import net.minecraft.recipe.book.RecipeCategory;
import net.minecraft.registry.Registries;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.TagKey;
import java.util.concurrent.CompletableFuture;
@ -28,6 +33,9 @@ public class JoyRecipeProvider extends FabricRecipeProvider {
offerConversion(JoyBlocks.BLUE_ALLIUM, Items.BLUE_DYE, exporter);
offerConversion(JoyBlocks.PINK_ALLIUM, Items.PINK_DYE, exporter);
offerConversion(JoyBlocks.WHITE_ALLIUM, Items.WHITE_DYE, exporter);
stonecutting(exporter, RecipeCategory.MISC, JoyItemTags.SHARKS, 1,
BlahajBlocks.PRIDE_ITEMS.toArray(Item[]::new));
}
private static void offerConversion(ItemConvertible base, Item dye, RecipeExporter exporter) {
@ -38,4 +46,24 @@ public class JoyRecipeProvider extends FabricRecipeProvider {
.withSuffixedPath("has_").toString(), conditionsFromItem(base))
.offerTo(exporter);
}
private static void stonecutting(RecipeExporter exporter, RecipeCategory category, TagKey<Item> base, int count, ItemConvertible... results) {
for (final var result : results) {
offerStonecuttingRecipe(exporter, category, result, base, count);
}
}
private static void offerStonecuttingRecipe(RecipeExporter exporter, RecipeCategory category, ItemConvertible output, TagKey<Item> input, int count) {
StonecuttingRecipeJsonBuilder.createStonecutting(Ingredient.fromTag(input), category, output, count)
.criterion(hasTag(input), conditionsFromTag(input))
.offerTo(exporter, "stonecutting/" + tagToItem(input, output));
}
private static String tagToItem(TagKey<?> input, ItemConvertible output) {
return getItemPath(output) + "_from_" + input.id().getPath();
}
private static String hasTag(TagKey<?> tag) {
return tag.id().withSuffixedPath("has_").toString();
}
}

View File

@ -16,6 +16,10 @@ public final class JoyItemTags {
ELYTRA = common("elytra"),
TOTEM_OF_UNDYING = common("totem_of_undying");
public static final TagKey<Item>
PLUSHIES = joy("plushies"),
SHARKS = joy("sharks");
private static TagKey<Item> joy(String name) {
return TagKey.of(RegistryKeys.ITEM, JoyUtil.id(name));
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:ace_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:agender_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:aro_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:aroace_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:bi_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:blue_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:blue_whale"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:bread"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:brown_bear"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:demi_r_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:demi_s_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:demiboy_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:demigirl_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:enby_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:gay_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:genderfluid_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:genderqueer_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:gray_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:grey_r_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:grey_s_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:greyrose_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:intersex_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:lesbian_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:pan_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:poly_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:pride_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,20 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "joy:trans_shark"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:ace_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:agender_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:aro_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:aroace_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:bi_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:blue_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:demi_r_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:demi_s_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:demiboy_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:demigirl_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:enby_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:gay_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:genderfluid_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:genderqueer_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:grey_r_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:grey_s_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:greyrose_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:intersex_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:lesbian_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:pan_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:poly_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:pride_shark"
},
"count": 1
}

View File

@ -1,12 +0,0 @@
{
"type": "minecraft:stonecutting",
"category": "misc",
"group": "plush_sharks",
"ingredient": {
"tag": "joy:sharks"
},
"result": {
"id": "joy:trans_shark"
},
"count": 1
}

View File

@ -1,10 +0,0 @@
{
"replace": false,
"values": [
"#joy:sharks",
"joy:blue_whale",
"joy:bread",
"joy:brown_bear"
]
}

View File

@ -1,30 +0,0 @@
{
"replace": false,
"values": [
"joy:gray_shark",
"joy:blue_shark",
"joy:ace_shark",
"joy:agender_shark",
"joy:aro_shark",
"joy:aroace_shark",
"joy:bi_shark",
"joy:demiboy_shark",
"joy:demigirl_shark",
"joy:demi_r_shark",
"joy:demi_s_shark",
"joy:enby_shark",
"joy:gay_shark",
"joy:genderfluid_shark",
"joy:genderqueer_shark",
"joy:greyrose_shark",
"joy:grey_r_shark",
"joy:grey_s_shark",
"joy:intersex_shark",
"joy:lesbian_shark",
"joy:pan_shark",
"joy:poly_shark",
"joy:pride_shark",
"joy:trans_shark"
]
}