Skip to content

Commit

Permalink
Fixed our conditional recipes and the automata_core recipe with the n…
Browse files Browse the repository at this point in the history
…bt ingredient
  • Loading branch information
SirEndii committed Dec 26, 2024
1 parent d01faba commit c6b6283
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 8 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ dependencies {

// Refined Storage
compileOnly "curse.maven:refined-storage-243076:${refinedstorage_version}"
// Comment this when you want to run runServer since refined storage is just annoying just like its API
//runtimeOnly "curse.maven:refined-storage-243076:${refinedstorage_version}"
runtimeOnly "curse.maven:refined-storage-243076:${refinedstorage_version}"

// AE2 Things
//compileOnly "curse.maven:ae2things-609977:${ae2things_version}-sources"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.4 2024-12-22T16:09:31.6915779 Recipes
// 1.20.4 2024-12-26T22:13:53.2984235 Recipes
81b2ee485995edeeb21c577d141a3fb3008561a4 data/advancedperipherals/advancements/recipes/redstone/block_reader.json
4900b8e92c78828e42f434730ad93917bb298a4a data/advancedperipherals/advancements/recipes/redstone/chat_box.json
397a6604bd3c093806aac1eabaa30819a83362ce data/advancedperipherals/advancements/recipes/redstone/chunk_controller.json
Expand All @@ -8,13 +8,15 @@
3bafb8fde05ec490e8f0211b0e97382fe713c08e data/advancedperipherals/advancements/recipes/redstone/geo_scanner.json
6f48a77e11a886df80c6672a514bd320915c9dee data/advancedperipherals/advancements/recipes/redstone/inventory_manager.json
7e27b6eb8d0d192dc319f646ba6447d2c9f4bd01 data/advancedperipherals/advancements/recipes/redstone/memory_card.json
e43499b6608246efc710214f24aa8c0ec4a65188 data/advancedperipherals/advancements/recipes/redstone/me_bridge.json
6550380146553418c22f70bef035aa7948fe58c5 data/advancedperipherals/advancements/recipes/redstone/nbt_storage.json
60949a6e0f4e50aee869fe617c256673b37e05f6 data/advancedperipherals/advancements/recipes/redstone/overpowered_end_automata_core.json
f7aaa36a885ee058e357422ef3261ed2e0e06c2f data/advancedperipherals/advancements/recipes/redstone/overpowered_husbandry_automata_core.json
6f8a6c4e74a4208915ec1f4c0065d62294c67c15 data/advancedperipherals/advancements/recipes/redstone/overpowered_weak_automata_core.json
1b08adf8952253e016be01157f749f6ab1bd3f0d data/advancedperipherals/advancements/recipes/redstone/peripheral_casing.json
6cefb0700ed4ff952ade60ca4ef9e48a9c0ff3fb data/advancedperipherals/advancements/recipes/redstone/player_detector.json
8f28aab37ae3dd8935ba3f827f2f0b1101852565 data/advancedperipherals/advancements/recipes/redstone/redstone_integrator.json
66277f490809169783247e32f37b501be83dfa6c data/advancedperipherals/advancements/recipes/redstone/rs_bridge.json
712fb0a23a9ab7cadab8bd05175c247a0b5295b4 data/advancedperipherals/advancements/recipes/redstone/weak_automata_core.json
f8acf88364459d1b38a9ac0fc3a2e87821f98edf data/advancedperipherals/recipes/block_reader.json
b1f3b9f50e62e2f53b23ad14248cb91acb745c37 data/advancedperipherals/recipes/chat_box.json
Expand All @@ -25,11 +27,13 @@ a39d46363291e5d98a8b96e17bfcfd44fbe3789d data/advancedperipherals/recipes/comput
4bf49ae496c60e5487c1e87013ef25e14bb13e3a data/advancedperipherals/recipes/geo_scanner.json
2eb633f159ac1b9feaffab383548f56b573f1519 data/advancedperipherals/recipes/inventory_manager.json
dbefebf13084fce55660cffabb955f25901a30f9 data/advancedperipherals/recipes/memory_card.json
f270bf14c921f717d294d8009356deeabf403053 data/advancedperipherals/recipes/me_bridge.json
fddcb2d34c37f4fd5834e077efd27f2cb6127c73 data/advancedperipherals/recipes/nbt_storage.json
afb8673c5643adbbf69a469776ac4cd908ab17e8 data/advancedperipherals/recipes/overpowered_end_automata_core.json
7c98974c9e5999b0186011ff7f910ae2b3cc76b6 data/advancedperipherals/recipes/overpowered_husbandry_automata_core.json
40110dc9c8616e5c9b30b087cfc2f9254c433025 data/advancedperipherals/recipes/overpowered_weak_automata_core.json
346dd97a088087077c157c29cb1ac7b25b0a0cef data/advancedperipherals/recipes/peripheral_casing.json
cba141d36a134a03ae91869abb91c9695bd92898 data/advancedperipherals/recipes/player_detector.json
d5a72afad727dd9814f4c8ef6b177a0db0bc9989 data/advancedperipherals/recipes/redstone_integrator.json
a0945caf9e8bd2921a1095fd5ffaf3f22790fa46 data/advancedperipherals/recipes/weak_automata_core.json
6354df82d465eba4f7f6c2bedf744a97bd6c8de6 data/advancedperipherals/recipes/rs_bridge.json
96aadb6d4a930083832331a5ad6f1b7970fa4cc7 data/advancedperipherals/recipes/weak_automata_core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"neoforge:conditions": [
{
"type": "neoforge:mod_loaded",
"modid": "ae2"
}
],
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"advancedperipherals:peripheral_casing"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "advancedperipherals:me_bridge"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_item"
]
],
"rewards": {
"recipes": [
"advancedperipherals:me_bridge"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"neoforge:conditions": [
{
"type": "neoforge:mod_loaded",
"modid": "refinedstorage"
}
],
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"advancedperipherals:peripheral_casing"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "advancedperipherals:rs_bridge"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_item"
]
],
"rewards": {
"recipes": [
"advancedperipherals:rs_bridge"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"neoforge:conditions": [
{
"type": "neoforge:mod_loaded",
"modid": "ae2"
}
],
"type": "minecraft:crafting_shaped",
"category": "redstone",
"key": {
"A": {
"item": "advancedperipherals:peripheral_casing"
},
"F": {
"item": "ae2:fluix_block"
},
"I": {
"item": "ae2:interface"
}
},
"pattern": [
"FIF",
"IAI",
"FIF"
],
"result": {
"item": "advancedperipherals:me_bridge"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"neoforge:conditions": [
{
"type": "neoforge:mod_loaded",
"modid": "refinedstorage"
}
],
"type": "minecraft:crafting_shaped",
"category": "redstone",
"key": {
"A": {
"item": "advancedperipherals:peripheral_casing"
},
"I": {
"item": "refinedstorage:interface"
},
"Q": {
"item": "refinedstorage:quartz_enriched_iron"
}
},
"pattern": [
"QIQ",
"IAI",
"QIQ"
],
"result": {
"item": "advancedperipherals:rs_bridge"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"tag": "forge:gems/diamond"
},
"L": {
"item": "minecraft:potion"
"type": "neoforge:nbt",
"item": "minecraft:potion",
"strict": true,
"tag": "{Potion:\"minecraft:long_regeneration\"}"
},
"R": {
"tag": "forge:storage_blocks/redstone"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package de.srendi.advancedperipherals.common.data;

import appeng.core.definitions.AEBlocks;
import com.refinedmods.refinedstorage.RSBlocks;
import com.refinedmods.refinedstorage.RSItems;
import dan200.computercraft.shared.ModRegistry;
import de.srendi.advancedperipherals.common.addons.APAddons;
import de.srendi.advancedperipherals.common.setup.Blocks;
import net.minecraft.data.PackOutput;
import net.minecraft.data.recipes.RecipeCategory;
Expand All @@ -16,6 +20,7 @@
import net.minecraft.world.level.block.Block;
import net.neoforged.neoforge.common.Tags;
import net.neoforged.neoforge.common.conditions.IConditionBuilder;
import net.neoforged.neoforge.common.conditions.ModLoadedCondition;
import net.neoforged.neoforge.common.crafting.NBTIngredient;

public class RecipesProvider extends RecipeProvider implements IConditionBuilder {
Expand Down Expand Up @@ -58,11 +63,11 @@ protected void buildRecipes(RecipeOutput recipeOutput) {

ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.NBT_STORAGE.get()).define('C', Tags.Items.CHESTS).define('A', CASING).define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE).define('I', Tags.Items.INGOTS_IRON).pattern("ICI").pattern("CAC").pattern("RCR").unlockedBy(HAS_ITEM, has(CASING)).save(recipeOutput);

//ConditionalRecipe.builder().addCondition(modLoaded("ae2")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.ME_BRIDGE.get()).define('F', AEBlocks.FLUIX_BLOCK.asItem()).define('A', CASING).define('I', AEBlocks.INTERFACE.asItem()).pattern("FIF").pattern("IAI").pattern("FIF").unlockedBy(HAS_ITEM, has(CASING))::save).build(consumer, new ResourceLocation(AdvancedPeripherals.MOD_ID, "me_bridge"));
ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.ME_BRIDGE.get()).define('F', AEBlocks.FLUIX_BLOCK.asItem()).define('A', CASING).define('I', AEBlocks.INTERFACE.asItem()).pattern("FIF").pattern("IAI").pattern("FIF").unlockedBy(HAS_ITEM, has(CASING)).save(recipeOutput.withConditions(new ModLoadedCondition(APAddons.AE2_MODID)));

//ConditionalRecipe.builder().addCondition(modLoaded("refinedstorage")).addRecipe(ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.RS_BRIDGE.get()).define('Q', RSItems.QUARTZ_ENRICHED_IRON.get()).define('A', CASING).define('I', RSBlocks.INTERFACE.get()).pattern("QIQ").pattern("IAI").pattern("QIQ").unlockedBy(HAS_ITEM, has(CASING))::save).build(consumer, new ResourceLocation(AdvancedPeripherals.MOD_ID, "rs_bridge"));
ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, Blocks.RS_BRIDGE.get()).define('Q', RSItems.QUARTZ_ENRICHED_IRON.get()).define('A', CASING).define('I', RSBlocks.INTERFACE.get()).pattern("QIQ").pattern("IAI").pattern("QIQ").unlockedBy(HAS_ITEM, has(CASING)).save(recipeOutput.withConditions(new ModLoadedCondition(APAddons.REFINEDSTORAGE_MODID)));

ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get()).define('A', CASING).define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE).define('S', Items.SOUL_LANTERN).define('D', Tags.Items.GEMS_DIAMOND).define('L', NBTIngredient.of(PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.LONG_REGENERATION))).pattern("RAR").pattern("DSD").pattern("RLR").unlockedBy(HAS_ITEM, has(CASING)).save(recipeOutput);
ShapedRecipeBuilder.shaped(RecipeCategory.REDSTONE, de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get()).define('A', CASING).define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE).define('S', Items.SOUL_LANTERN).define('D', Tags.Items.GEMS_DIAMOND).define('L', NBTIngredient.of(true, PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.LONG_REGENERATION))).pattern("RAR").pattern("DSD").pattern("RLR").unlockedBy(HAS_ITEM, has(CASING)).save(recipeOutput);

ShapelessRecipeBuilder.shapeless(RecipeCategory.REDSTONE, de.srendi.advancedperipherals.common.setup.Items.OVERPOWERED_WEAK_AUTOMATA_CORE.get()).requires(de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get()).requires(Items.NETHER_STAR).unlockedBy(HAS_ITEM, has(de.srendi.advancedperipherals.common.setup.Items.WEAK_AUTOMATA_CORE.get())).save(recipeOutput);

Expand Down

0 comments on commit c6b6283

Please sign in to comment.