Skip to content

Commit

Permalink
Update recipes
Browse files Browse the repository at this point in the history
Updated recipes for Farmer Delight's compatibility
  • Loading branch information
Chikorita-Lover committed Sep 7, 2024
1 parent b1453e8 commit 15950ab
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21 2024-08-31T12:40:46.0618963 Caffeinated/Block Loot Tables
// 1.21 2024-09-03T13:13:28.1272989 Caffeinated/Block Loot Tables
548d115eeb79b74d3fbe03951bdc179110ed6f8a data\caffeinated\loot_table\blocks\ground_coffee_cauldron.json
8b8e67a4f2fbd3f51a69d1359cceb2704429f4c3 data\caffeinated\loot_table\blocks\coffee_berry_crate.json
d481f7802dfc0e83cd271518b47e73b256a24d2f data\caffeinated\loot_table\blocks\flowering_coffee_shrub.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// 1.21 2024-08-31T12:40:46.0642817 Caffeinated/Recipes
bc56b1de573d33d57411984e3b1a021270bb9719 data\caffeinated\recipe\coffee_berry_crate.json
// 1.21 2024-09-03T13:13:28.1282986 Caffeinated/Recipes
5dc445d11ac1091b47d0393e020f2644f701cd29 data\caffeinated\recipe\coffee_berry_crate.json
97e68d175c7717e19fbfce0ae98005eecb936cdf data\caffeinated\recipe\ground_coffee_from_block.json
c53cb3ecd5aefc2402fa20a47249530bfe406917 data\caffeinated\advancement\recipes\misc\coffee_beans_from_coffee_berries.json
716ff4f0b5a0c7cba8f79624ca38943fa61f0dbe data\caffeinated\recipe\coffee_bean_block.json
c7380b07538b219d6c28d1ab96ed76850e2bf79c data\caffeinated\advancement\recipes\misc\ground_coffee_from_block.json
cbb4ddb0117ce716f60cead7b91aab12d73d3a13 data\caffeinated\advancement\recipes\food\coffee_berries_from_crate.json
9e061efc3626a119413e61ca86a53990ab4f8a8a data\caffeinated\advancement\recipes\misc\ground_coffee_from_coffee_beans.json
b8e94b6ab3e5b643e335a6036992426d7e3ed11c data\caffeinated\advancement\recipes\building_blocks\coffee_bean_block.json
5fd485c95e8541afbd5c36cbb898fc212dab1049 data\caffeinated\recipe\coffee_beans_from_block.json
b8e94b6ab3e5b643e335a6036992426d7e3ed11c data\caffeinated\advancement\recipes\building_blocks\coffee_bean_block.json
31f69cf23ef6a168c6d98a8fef731d470bcbb187 data\caffeinated\recipe\coffee_berries_from_crate.json
502b882af91d38778cbf774342f9a865f9420474 data\caffeinated\recipe\ground_coffee_block.json
e6061a3a68f93067a4057874be4ca45d0c759b01 data\caffeinated\recipe\java_banner_pattern.json
f1258bcc7fbf71701ecbdce075c9ac0d21afab91 data\caffeinated\advancement\recipes\decorations\coffee_berry_crate.json
32683e175792178cf8a7630890b33f7327dc0f3e data\caffeinated\recipe\coffee_beans_from_coffee_berries.json
de06447040bc87e767e2afd307bdf559a780865a data\caffeinated\advancement\recipes\misc\coffee_beans_from_block.json
514280f7d04586c23693c1dae8cf30241a810a24 data\caffeinated\advancement\recipes\building_blocks\coffee_berry_crate.json
51cbbbc43481615db699ce0878398bb475466f96 data\caffeinated\advancement\recipes\building_blocks\ground_coffee_block.json
31f69cf23ef6a168c6d98a8fef731d470bcbb187 data\caffeinated\recipe\coffee_berries.json
081e951942029c81b7edec2c02074e4b47d00d3d data\caffeinated\recipe\ground_coffee_from_coffee_beans.json
f241d014283983a15799cf435d7be5c883b1f112 data\caffeinated\recipe\tiramisu.json
28fbe891feaa35e46b5015bbcd4693e28b79ab4c data\caffeinated\advancement\recipes\food\tiramisu.json
d9e05f57073c3e404c58a204f07503f392f4d2fe data\caffeinated\advancement\recipes\food\coffee_berries.json
ea5881f924bd7cef6e6da660f1fd92cdf3e2584a data\caffeinated\advancement\recipes\misc\java_banner_pattern.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21 2024-08-31T12:40:46.0589212 Caffeinated/Model Definitions
// 1.21 2024-09-03T13:13:28.1242109 Caffeinated/Model Definitions
da4528a3cfafc1ab21e5814b64029c10ec357178 assets\caffeinated\blockstates\ground_coffee_block.json
26f35f3a03b0d53578efd2c555721b08353d75f0 assets\caffeinated\blockstates\coffee_cauldron.json
b1a481861132973fe035c9b9ce7613e15938034c assets\caffeinated\models\block\coffee_berry_crate.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:coffee_berry_crate"
"recipe": "caffeinated:coffee_berry_crate"
},
"trigger": "minecraft:recipe_unlocked"
}
Expand All @@ -34,7 +34,7 @@
],
"rewards": {
"recipes": [
"minecraft:coffee_berry_crate"
"caffeinated:coffee_berry_crate"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:coffee_berries"
"recipe": "caffeinated:coffee_berries_from_crate"
},
"trigger": "minecraft:recipe_unlocked"
}
Expand All @@ -34,7 +34,7 @@
],
"rewards": {
"recipes": [
"minecraft:coffee_berries"
"caffeinated:coffee_berries_from_crate"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"type": "minecraft:crafting_shaped",
"category": "misc",
"category": "building",
"key": {
"#": {
"item": "caffeinated:coffee_berries"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ public CaffeinatedRecipeProvider(FabricDataOutput output, CompletableFuture<Regi
super(output, registriesFuture);
}

private static void offerReversibleCompactingRecipes(RecipeExporter exporter, ItemConvertible input, ItemConvertible compacted, String compactingRecipeName, @Nullable String compactingRecipeGroup, String reverseRecipeName, @Nullable String reverseRecipeGroup) {
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, input, 9).input(compacted).group(reverseRecipeGroup).criterion(hasItem(compacted), conditionsFromItem(compacted)).offerTo(exporter, Caffeinated.of(reverseRecipeName));
ShapedRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, compacted).input('#', input).pattern("###").pattern("###").pattern("###").group(compactingRecipeGroup).criterion(hasItem(input), conditionsFromItem(input)).offerTo(exporter, Caffeinated.of(compactingRecipeName));
public static void offerReversibleCompactingRecipes(RecipeExporter exporter, RecipeCategory reverseCategory, ItemConvertible input, RecipeCategory compactCategory, ItemConvertible compacted, String compactingRecipeName, @Nullable String compactingRecipeGroup, String reverseRecipeName, @Nullable String reverseRecipeGroup) {
ShapelessRecipeJsonBuilder.create(reverseCategory, input, 9).input(compacted).group(reverseRecipeGroup).criterion(hasItem(compacted), conditionsFromItem(compacted)).offerTo(exporter, Caffeinated.of(reverseRecipeName));
ShapedRecipeJsonBuilder.create(compactCategory, compacted).input('#', input).pattern("###").pattern("###").pattern("###").group(compactingRecipeGroup).criterion(hasItem(input), conditionsFromItem(input)).offerTo(exporter, Caffeinated.of(compactingRecipeName));
}

@Override
public void generate(RecipeExporter exporter) {
final RecipeExporter farmersDelightExporter = this.withConditions(exporter, ResourceConditions.allModsLoaded("farmersdelight"));

offerReversibleCompactingRecipes(exporter, CaffeinatedItems.COFFEE_BEANS, CaffeinatedBlocks.COFFEE_BEAN_BLOCK, "coffee_bean_block", null, "coffee_beans_from_block", "coffee_beans");
offerReversibleCompactingRecipes(exporter, CaffeinatedItems.GROUND_COFFEE, CaffeinatedBlocks.GROUND_COFFEE_BLOCK, "ground_coffee_block", null, "ground_coffee_from_block", "ground_coffee");
offerReversibleCompactingRecipes(farmersDelightExporter, RecipeCategory.FOOD, CaffeinatedItems.COFFEE_BERRIES, RecipeCategory.DECORATIONS, CaffeinatedBlocks.COFFEE_BERRY_CRATE);
offerReversibleCompactingRecipes(exporter, RecipeCategory.MISC, CaffeinatedItems.COFFEE_BEANS, RecipeCategory.BUILDING_BLOCKS, CaffeinatedBlocks.COFFEE_BEAN_BLOCK, "coffee_bean_block", null, "coffee_beans_from_block", "coffee_beans");
offerReversibleCompactingRecipes(exporter, RecipeCategory.MISC, CaffeinatedItems.GROUND_COFFEE, RecipeCategory.BUILDING_BLOCKS, CaffeinatedBlocks.GROUND_COFFEE_BLOCK, "ground_coffee_block", null, "ground_coffee_from_block", "ground_coffee");
offerReversibleCompactingRecipes(farmersDelightExporter, RecipeCategory.FOOD, CaffeinatedItems.COFFEE_BERRIES, RecipeCategory.BUILDING_BLOCKS, CaffeinatedBlocks.COFFEE_BERRY_CRATE, "coffee_berry_crate", null, "coffee_berries_from_crate", null);

ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, CaffeinatedItems.COFFEE_BEANS).input(CaffeinatedItems.COFFEE_BERRIES).group("coffee_beans").criterion(hasItem(CaffeinatedItems.COFFEE_BERRIES), conditionsFromItem(CaffeinatedItems.COFFEE_BERRIES)).offerTo(exporter, Caffeinated.of("coffee_beans_from_coffee_berries"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,16 @@ public static void registerItemGroups() {
entries.addAfter(Items.WHEAT, COFFEE_BEANS, GROUND_COFFEE);
entries.addAfter(Items.PIGLIN_BANNER_PATTERN, JAVA_BANNER_PATTERN);
});
ItemGroupEvents.MODIFY_ENTRIES_ALL.register((group, entries) -> {
final String farmersDelight = "farmersdelight";
if (Registries.ITEM_GROUP.getId(group).equals(Identifier.of(farmersDelight, farmersDelight))) {
for (ItemStack stack : entries.getDisplayStacks()) {
if (Registries.ITEM.getId(stack.getItem()).equals(Identifier.of(farmersDelight, "carrot_crate"))) {
entries.addBefore(stack, CaffeinatedBlocks.COFFEE_BERRY_CRATE);
break;
}
}
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"farmersdelight"
]
}
],
"parent": "minecraft:recipes/root",
"criteria": {
"has_ground_coffee": {
"conditions": {
"items": [
{
"items": "caffeinated:ground_coffee"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "caffeinated:cooking/coffee_bottle"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_ground_coffee"
]
],
"rewards": {
"recipes": [
"caffeinated:cooking/coffee_bottle"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
{
"type": "farmersdelight:cooking",
"container": {
"count": 1,
"id": "minecraft:glass_bottle"
},
"cookingtime": 200,
"experience": 1.0,
"ingredients": [
{
"count": 1,
"id": "caffeinated:ground_coffee"
}
],
"recipe_book_tab": "drinks",
"result": {
"count": 1,
"id": "caffeinated:coffee_bottle"
}
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"farmersdelight"
]
}
],
"type": "farmersdelight:cooking",
"container": {
"count": 1,
"id": "minecraft:glass_bottle"
},
"experience": 1.0,
"ingredients": [
{
"item": "caffeinated:ground_coffee"
}
],
"recipe_book_tab": "drinks",
"result": {
"count": 1,
"id": "caffeinated:coffee_bottle"
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
{
"type": "farmersdelight:cutting",
"ingredients": [
{
"count": 1,
"id": "caffeinated:coffee_berries"
}
],
"result": [
{
"count": 2,
"id": "caffeinated:coffee_beans"
}
],
"tool": {
"tag": "c:tools/knives"
}
"fabric:load_conditions": [
{
"condition": "fabric:all_mods_loaded",
"values": [
"farmersdelight"
]
}
],
"type": "farmersdelight:cutting",
"ingredients": [
{
"item": "caffeinated:coffee_berries"
}
],
"result": [
{
"item": {
"count": 2,
"id": "caffeinated:coffee_beans"
}
}
],
"tool": {
"tag": "c:tools/knife"
}
}

0 comments on commit 15950ab

Please sign in to comment.