CraftTweaker Support - WanionCane/UniDict GitHub Wiki
Why an unification mod needs CraftTweaker Support?
UniDictAPI wasn't been being used till now;
so, we created this as a demonstration of the power of our API.
Recipe Templates
it can be used to create pattern recipes, basically, it will create recipes for all the resources that contains all the given kinds, using the given shape.
currently, these are the Recipe Templates commands available:
mods.unidict.api.newShapedRecipeTemplate(String outputKind, int outSize, String[][] shape);
mods.unidict.api.newShapelessRecipeTemplate(String outputKind, int outSize, String[] inputs);
just by using:
mods.unidict.api.newShapedRecipeTemplate("block", 1, [
[null, "gear", null],
["gear", "ingot", "gear"],
[null, "gear", null]
]);
we created this.
Removal by Kind
it will remove all the recipes of a given kind.
mods.unidict.removalByKind.get("removalByKindName").remove(String kindName);
Note: you must replace "removalByKindName" with a valid RemovalByKind instance. curently, these Removal By Kind are available:
- Crafting
- Furnace
example of usage:
mods.unidict.removalByKind.get("Crafting").remove("block");
just by using this line of code, it will remove all the recipes for "block", all the blocks, Iron Block, Gold Block... and so on...
we also have the possibility to apply a filter for this.
by using one optional variable, String[] resourceKindWhiteList
with it, it will only remove the Recipes for a Resource that contains certain kinds.
mods.unidict.removalByKind.get("Crafting").remove("block", ["ingot", "nugget"]);
on this case, it will only remove recipes of Resources that contains "ingot", and "nugget".