|
1 | 1 | package de.srendi.advancedperipherals.common.data; |
2 | 2 |
|
| 3 | +import appeng.core.definitions.AEBlocks; |
| 4 | +import com.refinedmods.refinedstorage.RSBlocks; |
| 5 | +import com.refinedmods.refinedstorage.RSItems; |
3 | 6 | import dan200.computercraft.shared.ModRegistry; |
| 7 | +import de.srendi.advancedperipherals.common.addons.APAddons; |
4 | 8 | import de.srendi.advancedperipherals.common.setup.Blocks; |
5 | 9 | import net.minecraft.data.PackOutput; |
6 | 10 | import net.minecraft.data.recipes.RecipeCategory; |
|
16 | 20 | import net.minecraft.world.level.block.Block; |
17 | 21 | import net.neoforged.neoforge.common.Tags; |
18 | 22 | import net.neoforged.neoforge.common.conditions.IConditionBuilder; |
| 23 | +import net.neoforged.neoforge.common.conditions.ModLoadedCondition; |
19 | 24 | import net.neoforged.neoforge.common.crafting.NBTIngredient; |
20 | 25 |
|
21 | 26 | public class RecipesProvider extends RecipeProvider implements IConditionBuilder { |
@@ -58,11 +63,11 @@ protected void buildRecipes(RecipeOutput recipeOutput) { |
58 | 63 |
|
59 | 64 | 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); |
60 | 65 |
|
61 | | - //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")); |
| 66 | + 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))); |
62 | 67 |
|
63 | | - //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")); |
| 68 | + 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))); |
64 | 69 |
|
65 | | - 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); |
| 70 | + 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); |
66 | 71 |
|
67 | 72 | 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); |
68 | 73 |
|
|
0 commit comments