Skip to content

Commit

Permalink
perf: ⚡Remove ~1500 [Squeezer] (forestry) capsule recipes
Browse files Browse the repository at this point in the history
This change related to [Can] (forestry) [Wax Capsule] [Refractory Capsule]

- Remove useless squeezer recipes, when forestry cans and capsules with every liquid in game could be squeezed.
- Remove all usages of those capsules and cans.
- Hide from JEI
  • Loading branch information
Krutoy242 committed Feb 4, 2024
1 parent 313706e commit 1b52403
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 11 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@@ -7,12 +7,9 @@
* forestry.api.fuels.FuelManager
* forestry.api.fuels.GeneratorFuel
* forestry.api.modules.ForestryModule
- * forestry.api.recipes.RecipeManagers
- * forestry.core.ModuleCore
* forestry.core.config.Config
* forestry.core.fluids.Fluids
* forestry.core.items.EnumContainerType
- * forestry.core.items.ItemRegistryCore
* forestry.core.items.ItemRegistryFluids
* forestry.core.proxy.Proxies
* forestry.core.recipes.RecipeUtil
@@ -43,12 +40,9 @@ import forestry.api.core.ForestryAPI;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.GeneratorFuel;
import forestry.api.modules.ForestryModule;
-import forestry.api.recipes.RecipeManagers;
-import forestry.core.ModuleCore;
import forestry.core.config.Config;
import forestry.core.fluids.Fluids;
import forestry.core.items.EnumContainerType;
-import forestry.core.items.ItemRegistryCore;
import forestry.core.items.ItemRegistryFluids;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
@@ -140,14 +134,8 @@ extends BlankForestryModule {

public void doInit() {
FluidStack biomass;
- FluidStack ethanol;
- if (RecipeManagers.squeezerManager != null) {
- ItemRegistryCore itemRegistryCore = ModuleCore.getItems();
- RecipeManagers.squeezerManager.addContainerRecipe(10, ModuleFluids.getItems().canEmpty.getItemStack(), itemRegistryCore.ingotTin.func_77946_l(), 0.05f);
- RecipeManagers.squeezerManager.addContainerRecipe(10, ModuleFluids.getItems().waxCapsuleEmpty.getItemStack(), itemRegistryCore.beeswax.getItemStack(), 0.1f);
- RecipeManagers.squeezerManager.addContainerRecipe(10, ModuleFluids.getItems().refractoryEmpty.getItemStack(), itemRegistryCore.refractoryWax.getItemStack(), 0.1f);
- }
- if ((ethanol = Fluids.BIO_ETHANOL.getFluid(1)) != null) {
+ FluidStack ethanol = Fluids.BIO_ETHANOL.getFluid(1);
+ if (ethanol != null) {
GeneratorFuel ethanolFuel = new GeneratorFuel(ethanol, (int)(32.0f * ForestryAPI.activeMode.getFloatSetting("fuel.ethanol.generator")), 4);
FuelManager.generatorFuel.put(ethanol.getFluid(), ethanolFuel);
}
3 changes: 3 additions & 0 deletions scripts/_init/purge.zs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ utils.rh(<excompressum:ore_smasher>);
utils.rh(<forestry:gear_tin>);
utils.rh(<forestry:gear_bronze>);
utils.rh(<forestry:gear_copper>);
utils.rh(<forestry:capsule>);
utils.rh(<forestry:can>);
utils.rh(<forestry:refractory>);
utils.rh(<appliedenergistics2:material:40>);
utils.rh(<mysticalagriculture:chunk>);
utils.rh(<mysticalagriculture:chunk:1>);
Expand Down
30 changes: 23 additions & 7 deletions scripts/mods/forestry.zs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,29 @@ for oil in [<liquid:oliveoil>, <liquid:seed.oil>] as ILiquidStack[] {
);
}

// Cheaper capsules
mods.forestry.Carpenter.removeRecipe(<forestry:wood_pulp>);
scripts.mods.forestry.Carpenter.addRecipe(<forestry:crafting_material:4>, [[<forestry:honeydew>, <ic2:fluid_cell>]], 100, <fluid:water> * 1000);
scripts.mods.forestry.Carpenter.addRecipe(<forestry:iodine_capsule>, [[<forestry:honey_drop>, <ic2:fluid_cell>]], 100, <fluid:water> * 1000);

# [Honey Pot] from [Honey Drop][+1]
craft.remake(<forestry:honey_pot>, [
"B",
"H",
"B"], {
"B": <ore:itemBeeswax>, # Beeswax
"H": <ore:dropHoney>, # Honey Drop
});

# [Ambrosia] from [Royal Jelly][+1]
craft.remake(<forestry:ambrosia>, [
"B",
"R",
"B"], {
"B": <ore:itemBeeswax>, # Beeswax
"R": <ore:dropRoyalJelly>, # Royal Jelly
});

// Proven Frames recycling
// [Impregnated Stick]*16 from [Proven Frame]
scripts.process.sawWood(<forestry:frame_proven>, <forestry:oak_stick> * 3);
Expand Down Expand Up @@ -317,13 +340,6 @@ for i, input in farmBlocks {
// [Carton] from [Compressed Sawdust]
scripts.process.crush(<thermalfoundation:material:801> /* Compressed Sawdust */, <forestry:carton>, 'only: CrushingBlock');

// Fix wax capsule uncraftable
// [Wax Capsule]*2 from [Pressed Wax]
recipes.removeByRecipeName('forestry:pam_wax_capsule');
craft.make(<forestry:capsule> * 2, ['PPP'], {
'P': <ore:materialPressedwax>, // Pressed Wax
});

// Remove all fireproof recipes. Fireproof only obtainable through breeding.
for log, plank in scripts.lib.wood.logPlank {
if (!log.definition.id.matches('.*fireproof.*')) continue;
Expand Down
4 changes: 2 additions & 2 deletions scripts/mods/forestry/Carpenter.zs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ addAltRecipe(<forestry:chipsets:0>.withTag({T:0 as short}, false), [[<minecraft:
addAltRecipe(<forestry:chipsets:1>.withTag({T:1 as short}, false), [[<minecraft:redstone>, <ore:ingotBronze>, <minecraft:redstone>], [<minecraft:redstone>, <ore:ingotBronze>, <minecraft:redstone>], [<minecraft:redstone>, <ore:ingotBronze>, <minecraft:redstone>]], 100, <fluid:water> * 1000);
addAltRecipe(<forestry:chipsets:2>.withTag({T:2 as short}, false), [[<minecraft:redstone>, <minecraft:iron_ingot>, <minecraft:redstone>], [<minecraft:redstone>, <minecraft:iron_ingot>, <minecraft:redstone>], [<minecraft:redstone>, <minecraft:iron_ingot>, <minecraft:redstone>]], 100, <fluid:water> * 1000);
addAltRecipe(<forestry:crafting_material:3> , [[<forestry:crafting_material:2>, <forestry:crafting_material:2>, <forestry:crafting_material:2>], [<forestry:crafting_material:2>, <forestry:crafting_material:2>, <forestry:crafting_material:2>], [<forestry:crafting_material:2>, <forestry:crafting_material:2>, <forestry:crafting_material:2>]], 100, <fluid:water> * 500);
addAltRecipe(<forestry:crafting_material:4> , [[<forestry:honeydew>, <forestry:royal_jelly>, <forestry:honeydew>], [<forestry:royal_jelly>, <forestry:can>, <forestry:royal_jelly>], [<minecraft:gunpowder>, <forestry:royal_jelly>, <minecraft:gunpowder>]], 100, <fluid:water> * 1000);
// addAltRecipe(<forestry:crafting_material:4> , [[<forestry:honeydew>, <forestry:royal_jelly>, <forestry:honeydew>], [<forestry:royal_jelly>, <forestry:can>, <forestry:royal_jelly>], [<minecraft:gunpowder>, <forestry:royal_jelly>, <minecraft:gunpowder>]], 100, <fluid:water> * 1000);
addAltRecipe(<forestry:crafting_material:6> , [[null, <forestry:honeydew>, null], [<ore:plankWood>, <ore:plankWood>, <ore:plankWood>], [<forestry:beeswax>, null, <forestry:beeswax>]], 100, <fluid:for.honey> * 500);
addAltRecipe(<forestry:crafting_material:6> , [[null, <forestry:honeydew>, null], [<ore:plankWood>, <ore:plankWood>, <ore:plankWood>], [<forestry:beeswax>, null, <forestry:beeswax>]], 100, <fluid:honey> * 500);
addAltRecipe(<forestry:escritoire> , [[<ore:plankWood>, null, null], [<ore:plankWood>, <ore:plankWood>, <ore:plankWood>], [<ore:plankWood>, null, <ore:plankWood>]], 100, <fluid:oliveoil> * 500);
Expand All @@ -83,7 +83,7 @@ addAltRecipe(<forestry:habitat_screen> , [[<ore:ingotBronze>, <min
addAltRecipe(<forestry:humus> * 9 , [[<ore:dirt>, <ore:dirt>, <ore:dirt>], [<ore:dirt>, <forestry:mulch>, <ore:dirt>], [<ore:dirt>, <ore:dirt>, <ore:dirt>]], 100, <fluid:water> * 1000);
// addAltRecipe(<forestry:impregnated_casing> , [[<ore:logWood>, <ore:logWood>, <ore:logWood>], [<ore:logWood>, null, <ore:logWood>], [<ore:logWood>, <ore:logWood>, <ore:logWood>]], 100, <fluid:oliveoil> * 250);
// addAltRecipe(<forestry:impregnated_casing> , [[<ore:logWood>, <ore:logWood>, <ore:logWood>], [<ore:logWood>, null, <ore:logWood>], [<ore:logWood>, <ore:logWood>, <ore:logWood>]], 100, <fluid:seed.oil> * 250);
addAltRecipe(<forestry:iodine_capsule> , [[<forestry:honey_drop>, <forestry:pollen>, <forestry:honey_drop>], [<forestry:pollen>, <forestry:can>, <forestry:pollen>], [<minecraft:gunpowder>, <forestry:pollen>, <minecraft:gunpowder>]], 100, <fluid:water> * 1000);
// addAltRecipe(<forestry:iodine_capsule> , [[<forestry:honey_drop>, <forestry:pollen>, <forestry:honey_drop>], [<forestry:pollen>, <forestry:can>, <forestry:pollen>], [<minecraft:gunpowder>, <forestry:pollen>, <minecraft:gunpowder>]], 100, <fluid:water> * 1000);
addAltRecipe(<forestry:kit_pickaxe> , [[<ore:ingotBronze>, <ore:ingotBronze>, <ore:ingotBronze>], [null, <ore:stickWood>, null], [null, <ore:stickWood>, null]], 100);
// addAltRecipe(<forestry:kit_shovel> , [[null, <ore:ingotBronze>, null], [null, <ore:stickWood>, null], [null, <ore:stickWood>, null]], 100);
// addAltRecipe(<forestry:letters> , [[<thermalfoundation:material:800>, <thermalfoundation:material:800>, <thermalfoundation:material:800>], [<thermalfoundation:material:800>, <thermalfoundation:material:800>, <thermalfoundation:material:800>], [null, null, null]], 100, <fluid:water> * 250);
Expand Down
2 changes: 1 addition & 1 deletion scripts/mods/gendustry.zs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ craft.make(<gendustry:labware> * 16, ['pretty',
'H H',
'H A H',
' B '], {
H: <forestry:can>,
H: <ic2:fluid_cell>,
A: <forestry:propolis>,
B: <ore:dustEndstone>,
});
Expand Down
2 changes: 1 addition & 1 deletion scripts/mods/industrialcraft2.zs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function morphDust(fruit as IItemStack, liquid as ILiquidStack, extra as IItemSt

// Bigger fluid output + capsule
val amount = (liquid.amount * 2) / 1000;
val capsule = <forestry:refractory:1>.withTag({ Fluid: { FluidName: liquid.name, Amount: 1000 } });
val capsule = FluidCell(liquid.name);
mods.rats.recipes.addChefRatRecipe(fruit, amount > 1 ? capsule * amount : capsule);

// Thaumcraft aspects
Expand Down
1 change: 1 addition & 0 deletions scripts/mods/thaumcraft_aspects.zs
Original file line number Diff line number Diff line change
Expand Up @@ -2199,6 +2199,7 @@ val removeItemAspectList = [
<forestry:lepidopterist_bag>,
<forestry:miner_bag_t2>,
<forestry:miner_bag>,
<forestry:refractory:1>,
<forge:bucketfilled>,
<gendustry:gene_template>,
<ic2:fluid_cell>,
Expand Down

0 comments on commit 1b52403

Please sign in to comment.