What the Mod Is:
When you first run the mod, it will generate a config/CraftingHarmonics/Sets folder, in which you can put one or more .json or .js files to define your recipe sets. There are three types of recipe sets at current:
- ‘default’: Will be always be applied.
- Difficulty-based sets: These sets allow you to define different recipes depending on what difficulty the game is set to. Available options are:
- Custom sets: These sets are intended for use in quest-based packs and can be added/removed at any time by running the /ch applySet and /ch removeSet commands. Set names must be alphanumeric (A-Z or 0-9), with no spaces.
Currently, the file is expected to look like the sample files here. Each operation is specified as an object that gives a type (described below), and one or more additional options.
Currently, the following operations are implemented:
- remove: Removes any ability to craft the specified item
- addShaped: Adds a shaped recipe
- addShapeless: Adds a shapeless recipe
- addFurnace: Adds a furnace recipe
- addFurnaceFuel: Adds a furnace fuel
- addBrew: Adds a brewing stand recipe
- registerOreDictItem: Adds an item to an ore dictionary
- remapHarvestLevel: Takes all blocks at a given harvest level and set them to another.
- setHarvestLevel: Sets the harvest level on a given block/with a given tool.
- setToolHarvestLevel: Changes the effective harvest level of a particular tool.
- setMobDrops: Changes what items mobs can drop in a variety of ways.
- setBlockDrops: Changes what items blocks can drop in a variety of ways.
- addMobShed: Add ‘shedding’ to mobs (similar to Botania).
- addStarterItem: Add a list of items to the player’s inventory when they first join a world/server.
- addMobPotionEffect: Add potion effects to mobs (and players) based on the matcher system. See the wiki for more information.
- addEntityEvent: Ability to add generic events to entities based on the Matcher System, with events based on Event Callbacks.
- setSkyColor: Changes the sky color of a given dimension while the operation is in effect.
- addTileEntityEvent: Ability to add generic events to tile entities (chests, furnaces, etc) based on theMatcher System, with events based on Event Callbacks.
If you have Tinker’s Construct installed, the following operations are added:
- addSmelteryMelt: Adds an item that can be melted down in the smeltery.
- removeSmelteryMelt: Removes an item from being able to be melted in the smeltery
- addSmelteryAlloy: Adds an alloy that can be made from two or more materials in the smeltery
- removeSmelteryAlloy: Removes an alloy from being made in the smeltery; can specify the inputs, or leave it blank to remove all ways of making the given alloy.
- addSmelteryFuel: Add a fuel (like lava) to the smeltery
- removeSmelteryFuel: Remove a fuel from the smeltery
- addSmelteryTableCast: Add an item that can be casted in the casting table.
- addSmelteryBasinCast: Add an item that can be casted in the casting basin.
- removeSmelteryTableCast: Remove an item from being created in the casting table.
- removeSmelteryBasinCast: Remove an item from being created in the casting basin.
- setMaterialStats: Modifies the stats for a given material.
- setHarvestLevelName: Adds a new name for a harvest level or modifies an existing one.
- TConstruct.addDryingRecipe: Adds a new recipe to the drying rack.
- TConstruct.removeDryingRecipe: Removes a recipe from the drying rack.
If you have Blood Magic installed, the following operations are added:
- addBloodAltarRecipe/removeBloodAltarRecipe: Add/Remove something from the Blood Altar.
- addHellfireForgeRecipe/removeHellfireForgeRecipe: Add/Remove something from the Hellfire Forge
- addAlchemyArray/removeAlchemyArray: Add/Remove alchemy array crafts/bindings
- BloodMagic.addAlchemyTable: Add a recipe to the alchemy table.
- BloodMagic.removeAlchemyTable: Remove a recipe from the alchemy table.
- BloodMagic.addImperfectRitual: Adds an imperfect ritual that can call various event callbacks when activated.
If you have JEI installed, the following operations are added:
- hide: Hides a block from being visible in JEI’s list.
- show: Shows a previously hidden block.
If you have TechReborn installed, the following operations are added:
If you have AbyssalCraft installed, the following operations are added:
If you have Botania Unofficial installed, the following operations are added:
See the Wiki for more information on each operation (Tinker’s operations still pending documentation) or the sample file for examples.
For shaped and shapeless recipes, item inputs can be specified in one of two formats. Furnace and Brewing Stand recipes can only be the first, string based format:
- Basic string format: “minecraft:stick:0”, where we have the mod name “minecraft”, the item name “stick”, and the metadata 0.
- Expanded format: An object with the following fields
- item (required): A string in the above format.
- nbt (optional): An object that represents the NBT tag to check the item against.
- fuzzyNbt (optional): A Boolean (true/false) value indicating if the NBT should be an exact match, or just make sure it has the given keys.
- returnOnCraft (optional): A Boolean value indicating if the item should be given back to the player after using it in the recipe.
- replaceOnCraft (optional): A string representation of the item to replace the given item with. If not provided, the item is not replaced with another item.
- damageOnCraft (optional): A number value indicating how much to damage the item by when it’s used in the recipe; if provided, this implies returnOnCraft. If not provided, no damage occurs.
- onCraft (optional): Function callback to call when the item is used in crafting. Has a single event argument, which has the following fields:
- item: An object with the following methods
- returnItem(): Causes the item to be returned
- destroyItem(): Ensures the item isn’t returned (is implied if you don’t use returnItem, though)
- replaceItem(string): Replaces the item with the other given item.
- damageItem(int): Damages the item by the given amount.
- random: An object that is an instance of Java’s Random. The random number generator is keyed to the crafting player, and is syncrhonized between the server and the client, and thus will return the same value when both complete the craft. This has the following methods (and more):
- nextBoolean(): Returns true or false
- nextFloat(): Returns a decimal value between 0.0 and 1.0; useful for calculating percentage chances.
- nextInt(number): Returns a whole number between 0 and the number provided; useful for calculating random return quantities.
- item: An object with the following methods
The mod provides a single root command (/ch) that may be used in SP, and by operators on servers (I think…). The following subcommands are available:
- reload: Reloads the configuration from disk and syncs it out to all connected players.
- getHeldNBT: Outputs the stringified NBT of your currently held item to the console log and to chat so that you can use and modify it when specifying recipes. This may only be used by a player in the game, as you need an item to read.
- getResourceLocator: Outputs the resource locator (modname:itemname) and metadata of your currently held item to the console log and to chat so that you can use and modify it when specifying recipes. This may only be used by a player in the game, as you need an item to read.
- listFluids: List out all available fluids that are registered with Forge.
- applySet: When given one or more set names, this will add the given recipe set(s) into the game. Can be used with quest mods that allow commands to be run / command blocks in order to open up new recipes as the player progresses. You can also specify –silent (or -s) to make the command not output anything to the chat log when run. (ex: /applySet –silent customSet1 customSet2)
- removeSet: When given one or more set names, this will remove the given recipe set(s) from the game. As above, this is meant to be used with quest mods / command blocks. You can also specify –silent (or -s) to make the command not output anything to the chat log when run. (ex: /removeSet –silent customSet1 customSet2).
- getAchievementList: List out all available achievement IDs for use in the playerHasAchievement matcher.
- reloadQuestCache: Force a reload of the quest cache, if you need to test a recently added quest; should never need to be run in normal gameplay.
- genSamples: Regenerates the sample config files (will overwrite any .sample files, but will leave the rest of your sets alone).