Compact Solars

Compact Solars

19M Downloads

Recipes cannot be removed by CraftTweaker2

BadRAM opened this issue ยท 1 comments

commented

I wrote this CraftTweaker2 script to make the regular panels unavailable while keeping the solar hats

// remove compact solar blocks and their recipes
recipes.remove(<compactsolars:compact_solar_block:*>);
//recipes.remove(<compactsolars:compact_solar_block:1>);
//recipes.remove(<compactsolars:compact_solar_block>);

// cheaper lv1 solar helm (wood helmet)
recipes.remove(<ic2:solar_helmet>);
recipes.addShaped(<ic2:solar_helmet>, [[<ore:plankWood>, <ore:plankWood>, <ore:plankWood>],[<ore:plankWood>, <ic2:te:8>, <ore:plankWood>], [<ic2:cable>.withTag({type: 0 as byte, insulation: 1 as byte}).onlyWithTag({type: 0 as byte, insulation: 1 as byte}), <ic2:cable>.withTag({type: 0 as byte, insulation: 1 as byte}).onlyWithTag({type: 0 as byte, insulation: 1 as byte}), <ic2:cable>.withTag({type: 0 as byte, insulation: 1 as byte}).onlyWithTag({type: 0 as byte, insulation: 1 as byte})]]);

// change solar hat recipes to compound on eachother.
recipes.remove(<compactsolars:solar_hat_low_voltage>);
recipes.addShaped(<compactsolars:solar_hat_low_voltage>, [[<ic2:solar_helmet>, <ic2:solar_helmet>, <ic2:solar_helmet>],[<ic2:solar_helmet>, <ic2:te:77>, <ic2:solar_helmet>], [<ic2:solar_helmet>, <ic2:solar_helmet>, <ic2:solar_helmet>]]);

recipes.remove(<compactsolars:solar_hat_medium_voltage>);
recipes.addShaped(<compactsolars:solar_hat_medium_voltage>, [[<compactsolars:solar_hat_low_voltage>, <compactsolars:solar_hat_low_voltage>, <compactsolars:solar_hat_low_voltage>],[<compactsolars:solar_hat_low_voltage>, <ic2:te:78>, <compactsolars:solar_hat_low_voltage>], [<compactsolars:solar_hat_low_voltage>, <compactsolars:solar_hat_low_voltage>, <compactsolars:solar_hat_low_voltage>]]);

recipes.remove(<compactsolars:solar_hat_high_voltage>);
recipes.addShaped(<compactsolars:solar_hat_high_voltage>, [[<compactsolars:solar_hat_medium_voltage>, <compactsolars:solar_hat_medium_voltage>, <compactsolars:solar_hat_medium_voltage>],[<compactsolars:solar_hat_medium_voltage>, <ic2:te:79>, <compactsolars:solar_hat_medium_voltage>], [<compactsolars:solar_hat_medium_voltage>, <compactsolars:solar_hat_medium_voltage>, <compactsolars:solar_hat_medium_voltage>]]);

While the ic2 recipes are replaced correctly, the old compactsolars recipes remain. This may be because generateRecipes() and generateHatRecipes() are being called in postInit() instead of init(). I would test this change myself, but player.to is down so gradle can't get the IC2 API.

commented

#28 Pull request made