More Crafttweaker functions
serialtasted opened this issue ยท 1 comments
Hey there,
I would like to ask you some more features for the crafttweaker component of this mod.
I'm using the ones you have and it's so powerful that it made me want some more functions to help on recursive recipes.
If possible I would like to suggest some features. Most features that I was looking forward to see added are ways to be able to use with other mods functions. For example iterating trough all block kind and add them to a recipe on an IE machine.
Here are some suggestions:
- Function to get an IItemStack[] for all items in a kind [e.g. getAllFromKind("ingot");]
val allIngots = getAllFromKind("ingot");
for ingot in allIngots {
mods.thermalexpansion.Compactor.removeStorageRecipe(ingot);
}
- Function to get all variants of an item as an IItemStack[] with optional filter [e.g. getAllVariant("Iron");] [e.g. getAllVariant("Gold", ["ingot", "plate"]);]
val variantsIron = getAllVariant("Iron");
for variant in variantsIron {
recipes.remove(variant);
}
- Function to get a variant of an item as an IIngredient from another item [e.g. getVariantOf(<minecraft:gold_block>, "ingot"); // This would output <minecraft:gold_ingot>]
val allBlocks = getAllFromKind("block");
for block in allBlocks {
val ingot = getVariantOf(block, "ingot");
mods.thermalexpansion.Compactor.addStorageRecipe(block, ingot * 9, 4000);
}
It might be a bit far fetched but if you could make something out of this would be great.