GregTech CE Unofficial

GregTech CE Unofficial

412k Downloads

[BUG] cannot change nerfed wood plank recipe output via CT

Quarri6343 opened this issue ยท 0 comments

commented

Describe the bug
CraftTweaker cannot modify the output of the hardmode wood plank recipe because it was implemented with the following special code:

//wood nerf
if (ConfigHolder.recipes.nerfWoodCrafting) {
//remove the old recipe
ModHandler.removeRecipeByName(outputRecipe.getRegistryName());
// new wood recipes
//noinspection ConstantConditions
ModHandler.addShapelessRecipe(outputRecipe.getRegistryName().toString(),
GTUtility.copyAmount(Math.max(1, originalOutput / 2), plankStack), stack);
ModHandler.addShapedRecipe(outputRecipe.getRegistryName().getPath() + "_saw",
GTUtility.copyAmount(originalOutput, plankStack), "s", "L", 'L', stack);
} else {
//noinspection ConstantConditions
ModHandler.addShapedRecipe(outputRecipe.getRegistryName().getPath() + "_saw",
GTUtility.copyAmount((int) (originalOutput * 1.5), plankStack), "s", "L", 'L', stack);
}

Versions
Forge: 14.23.5.2860
GTCEu: gregtech-1.12.2-2.1.4-beta.jar
Modpack: GregTech Expert 2

Screenshots
example CT code:

recipes.remove(<minecraft:planks:*>);
recipes.remove(<gregtech:planks>);
recipes.addShapeless(<minecraft:planks:5> * 2, [<ore:gtce.tool.saws>, <minecraft:log2:1>]);
recipes.addShapeless(<minecraft:planks:4> * 2, [<ore:gtce.tool.saws>, <minecraft:log2>]);
recipes.addShapeless(<minecraft:planks:3> * 2, [<ore:gtce.tool.saws>, <minecraft:log:3>]);
recipes.addShapeless(<minecraft:planks:2> * 2, [<ore:gtce.tool.saws>, <minecraft:log:2>]);
recipes.addShapeless(<minecraft:planks:1> * 2, [<ore:gtce.tool.saws>, <minecraft:log:1>]);
recipes.addShapeless(<minecraft:planks> * 2, [<ore:gtce.tool.saws>, <minecraft:log>]);
recipes.addShapeless(<minecraft:planks:5>, [<minecraft:log2:1>]);
recipes.addShapeless(<minecraft:planks:4>, [<minecraft:log2>]);
recipes.addShapeless(<minecraft:planks:3>, [<minecraft:log:3>]);
recipes.addShapeless(<minecraft:planks:2>, [<minecraft:log:2>]);
recipes.addShapeless(<minecraft:planks:1>, [<minecraft:log:1>]);
recipes.addShapeless(<minecraft:planks>, [<minecraft:log>]);
recipes.addShapeless(<gregtech:planks>, [<gregtech:rubber_log>]);

the result:
image

Expected behavior
It can be solved temporary (we patched) like this:
GTModpackTeam@1b252ba
GTModpackTeam@34a767b