// Make BuildCraft recepies have better integration with other mods. // Replaces hardcoded references with oredicted values. import crafttweaker.item.IItemStack; import crafttweaker.oredict.IOreDictEntry; // Use generic wood instead of hardcoded enumerations where applicable. No more vanilla wood needed! // Also removes need to craft framing boards when generic wood is acceptable. // Covered by my bibliocraft changes /* recipes.removeByRecipeName("bibliocraft:framingsheet"); recipes.addShapeless("bibliocraft_framingsheet_fix", *2, [, .reuse()]); recipes.removeByRecipeName("bibliocraft:framingsaw"); recipes.addShaped("bibliocraft_framingsaw_fix", , [[, , null], [null, , | ], [null, null, | ]]); recipes.removeByRecipeName("bibliocraft:framingsaw"); recipes.addShaped("bibliocraft_bibliochase_fix", , [[null, | , null], [ | , , | ], [null, | , null]]); */ // Use oredicted dyes for crafting // Covered by my bibliocraft changes /* recipes.removeByRecipeName("bibliocraft:stockroomcatalog"); recipes.addShaped("bibliocraft_stockroomcatalog_fix", , [[, , ], [, , ], [, , ]]); recipes.removeByRecipeName("bibliocraft:tape"); recipes.addShaped("bibliocraft_tape_fix", , [[, , ], [, , ], [, , ]]); recipes.removeByRecipeName("bibliocraft:reading_glasses"); recipes.addShaped("bibliocraft_reading_glasses_fix", , [[, , ], [, null, ]]); recipes.removeByRecipeName("bibliocraft:tinted_glasses"); recipes.addShapeless("bibliocraft_tinted_glasses_fix", , [, ]); */ // Use oredicted dyes for coloring lamps, lanterns, typewriters and sword pedestals // Items that are affected val ColorableItems = { lamp_gold: , lamp_iron: , lantern_gold: , lantern_iron: , typewriter: , sword_pedestal: } as IItemStack[string]; // Maps metadata values to dyes val IdToDye = [ , , , , , , , , , , , , , , , ] as IOreDictEntry[]; for itemName, item in ColorableItems { var acceptableInputs = item; for metadata in 1 .. 15 { acceptableInputs |= item.definition.makeStack(metadata); } for metadata, dye in IdToDye { val resultingItem = item.definition.makeStack(metadata); recipes.removeShapeless(resultingItem, [], true); // Shouldn't break things recipes.addShapeless( "bibliocraft_" + itemName + "_" + (metadata as string) + "_fix", resultingItem, [dye, acceptableInputs] ); } }