Crafting Harmonics

Current Status, 09/13/2016

Lately, the number of updates to this mod have dropped off sharply as a result of a significant portion of my time being consumed by projects for my actual job; as such, I have very little downtime in which to do everything else I'm responsible for. While Crafting Harmonics is still something that I currently intend to continue - at least for Minecraft 1.10 - I do not really have the time to update it like I have been in the past.  Updates will happen, they will just be significantly slower.  Also, the fact that I was just out of town for a while to attend PAX West, and then the required recovery period following that trip did not help.

 

In addition to this, lately, multiple major mods that we have integration with have pushed out breaking changes to their public APIs - and continue to do so - without much regard for those who use their APIs.  This not only makes it difficult for me to keep up with updating my codebase to play nicely with theirs, but also requires that users of Crafting Harmonics use only the correct combination of versions of the other mods to avoid crashes.  While I've tried to take the utmost care in preventing things from causing actual crashes in the game, there are some cases in which this is either unavoidable, or at least difficult.  As such, before I continue with any updates to the mod itself, I need to spend time breaking apart the cross mod integration into separate mods (one additional mod per integration) so that users can pick and choose the correct version to use for the version of, say, Blood Magic or Tinker's Construct that they have installed, without needing to upgrade/downgrade others they're not ready/able to change.

 

Going forward, however, if a mod continually breaks their API in repeated updates, I will drop support for it.  It is not worth my time or yours to continue trying to support any other mod that doesn't want to be supported.

 


 

What the Mod Is:

Allows users to add and remove recipes from the game's crafting manager, similar to MineTweaker, as well as to tweak various other aspects of the game - including block and mob drops - and even create new effects and mechanics all using either a JavaScript or a JSON-based config format.  Multiple config files are supported.

 

 

Config Format:

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:
    • 'peaceful'
    • 'easy'
    • 'normal'
    • 'hard'
  • 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.

 

 

Operation Types

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 the Matcher System, with events based on Event Callbacks.
  • setLightLevel: Changes the light level emitted by the given block.
  • setBlockHardness: Changes the hardness of the given block.
  • setStepHeight: Changes the step height of an entity to the given value.
  • rename: Renames an item (well, replaces its localization with the provided string).
  • setItemDurability: Changes the maximum durability of a given tool / item.
  • forceWeather: Forces the weather to be the given weather until changed by something else.

 

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:

  • TechReborn.addAlloySmelter
  • TechReborn.addAssemblingMachine
  • TechReborn.addBlastFurnace
  • TechReborn.addCentrifuge
  • TechReborn.addChemicalReactor
  • TechReborn.addCompressor
  • TechReborn.addExtractor
  • TechReborn.addGrinder
  • TechReborn.addImplosionCompressor
  • TechReborn.addIndustrialElectrolyzer
  • TechReborn.addIndustrialGrinder
  • TechReborn.addSawmill
  • TechReborn.addPlateCutter
  • TechReborn.addVacuumFreezer
  • TechReborn.removeRecipe
  • TechReborn.addFusionReaction
  • TechReborn.removeFusionReaction
  • TechReborn.addShapedRollingMachine
  • TechReborn.addShapelessRollingMachine
  • TechReborn.removeRollingMachine

 

If you have AbyssalCraft installed, the following operations are added:

  • AbyssalCraft.addCrystallization
  • AbyssalCraft.removeCrystallization
  • AbyssalCraft.addTransmutation
  • AbyssalCraft.removeTransmutation

 

If you have Botania Unofficial installed, the following operations are added:

  • Botania.addPetalRecipe
  • Botania.addPureDaisy
  • Botania.addManaInfusion
  • Botania.addRunicAltar
  • Botania.addElvenTrade
  • Botania.removePetalRecipe
  • Botania.removePureDaisy
  • Botania.removeManaInfusion
  • Botania.removeRunicAltar
  • Botania.removeElvenTrade

 

If you have Roots installed, the following operations are added:

  • Roots.addRitual: Add a crafting ritual.
  • Roots.removeRitual: Remove any ritual.
  • Roots.disableDust: Remove the ability to craft a petal dust.
  • Roots.enableDust: Enables the ability to craft a given petal dust after disabling it.
  • Roots.setReagents: Set the list of items required to craft a given petal dust.
  • Roots.setSpellCost: Set the mana cost for a given spell.

If you have Forestry installed, the following operations are added:

  • Forestry.addCarpenterRecipe
  • Forestry.addCentrifugeRecipe
  • Forestry.addFabricatorRecipe
  • Forestry.addFermenterRecipe
  • Forestry.addMoistenerRecipe
  • Forestry.addSqueezerRecipe
  • Forestry.addStillRecipe

 

See the Wiki for more information on each operation (Tinker's operations still pending documentation) or the sample file for examples.

 

Input Items:

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.

 

 

Commands:

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).

 

Changelog

Version 1.5.7

  • Updating Tinker's Construct support to 2.4.0
  • Adding TConstruct.disableModifier / TConstruct.enableModifier operations

Version 1.5.6

  • Adding in the ability to change some aspects of Roots with the following operations:
    • Roots.addRitual: Add a crafting ritual.
    • Roots.removeRitual: Remove any ritual.
    • Roots.disableDust: Remove the ability to craft a petal dust.
    • Roots.enableDust: Enables the ability to craft a given petal dust after disabling it.
    • Roots.setReagents: Set the list of items required to craft a given petal dust.
    • Roots.setSpellCost: Set the mana cost for a given spell.
    In addition, a matcher - rootsHasMana - has been added to check player mana; this is available for everything but tile entity events.

  • Adding in a new matcher for Blood Magic that will apply to all matcher types that checks for the demonic will in a given chunk.

 

Version 1.5.5

  • Added @p replacement for runPlayerCommand callback's name parameter, and allowing it to be used for any living entity, not just players.
  • Added the new 'addEntityInteraction', which allows for custom interactions with command callbacks when dealing with entities.
  • Added the new 'addBlockInteraction' operation, which allows for custom interactions with command callbacks when the player right-clicks on a block, including preventing default handling when matched.
  • Adding the ability to add recipes to Forestry machines with the following operations:
    • Forestry.addCarpenterRecipe
    • Forestry.addCentrifugeRecipe
    • Forestry.addFabricatorRecipe
    • Forestry.addFermenterRecipe
    • Forestry.addMoistenerRecipe
    • Forestry.addSqueezerRecipe
    • Forestry.addStillRecipe
  • Fixing issue #145 where the 'create' parameter was ignored if the scoreboard objective didn't exist at all.
  • Fixing issue #149 where looting and fortune multipliers had to be specified as doubles and would fail if they were integers.

Version 1.5.4

  • Adding in a console log message when a block matcher is invalid or matches air when it's not supposed to.
  • Fixing issue #138 (again) where the JEI 'hide' and 'show' operations weren't working in some circumstances.
  • Fixing issue #144 where the world provider for the Nether was being specifically checked for spawning Wither Skeletons. I've now redone the entire forced weather system to not require a proxied world provider.

 

Version 1.5.3

  • Adding in more visible feedback for the reload command, and upon login, when there are errors in user config files.
  • Updating runPlayerCommand to allow it to run multiple commands at once.
  • Fixing issue #138 where the JEI 'hide' and 'show' operations weren't working in some circumstances.
  • Fixing issue #140 where the Ender Dragon would become invulnerable because Minecraft expects The End to have a special world provider.
  • Fixing issue #141 where BaseAddOperation could cause an NPE if it wasn't able to find a proper item to add.
  • Updating to the newest version of the Nashorn Scripting Library, so that items that require arrays can be passed a single instance of the item and still deserialize properly.

 

Version 1.5.2

  • Adding a new operation 'rename' in order to rename every instance of an item that doesn't have a custom display name.
  • Adding a new operation 'setItemDurability' in order to set the maximum durability of a damageable item such as a pickaxe/battery/etc.
  • Adding a new operation 'forceWeather' that can force the weather in a given dimension to be clear, rain, or storming while the operation is in effect unless something else overrides it.
  • Adding a new matcher 'isBurning' to check if the relevant entity is on fire or not. This will test the slain mob for mob drops, and the harvester/target for all others.
  • Adding support for 'onDrop' entity callbacks for block drops, mob drops, and mob sheds. Use this in order to apply a variety of interesting effects when a particular drop is obtained.

 

Version 1.5.1

  • dding in a way to prevent specific blocks from being placed, or items from being used.
  • Adding in item display names to the getResourceLocator and getHeldNBT commands, in order to assist in reading the logs later on.
  • Adding in the 'setLightLevel' operation to set the light level for a given block; this should generally only be used in a base set, as blocks must be picked up and placed back down to update their lighting.
  • Adding int he 'setBlockHardness' operation to set the hardness of individual blocks; unlike the light level this can be changed on the fly.
  • Adding new entity callback 'setStepHeight'; this operation will immediately change the entity's step height to the given value.
    1.10 note: This will not work for players, due to the changes made for auto-jump.
  • Adding a few new matchers to check for the armor value of the respective entity:
    • armorMin
    • armorMax
    • armorRange

    These can be applied to the following:
    • Block Drops: Checks the harvester.
    • Entity Events/Potions: Checks the target.
    • Mob Drops: Checks the mob being killed.
    • Mob Sheds: Checks the target mob.
  • Updating the coremod portion of the mod; this will produce a warning, but will allow it to load between versions.
  • Fixing issue #128 where our command handler wasn't properly implementing compareTo, causing a warning when used with HelpFixer.

 

Version 1.5.0

  • Users may now use .js files as well as .json files in their Sets directory in order to write configuration scripts in pure JavaScript instead of using JSON. Not all operations currently have a JavaScript equivalent, especially cross-mod integration, however, the JavaScript system will allow you to also add a JSON object directly to a set, so some level of scripting is still applicable to all operations. See the wiki for more.
  • Sample files have been improved some; there's now even a '/ch genSamples' command to regenerate them after each version update.
  • Fixing issue #114 where the weather matchers for blocks weren't properly checking the block above them, and thus, were always false.
  • Fixing issue #123 where tile entity events wouldn't work on servers due to an issue with initializing the tile entity handler.
  • Fixing an issue where remove operations that were repeatedly applied/removed would end up creating duplicate recipes.

 

 

Previous Changelogs:

Version 1.4.8

  • Fixing issue #110 where TechReborn integration would fail with recent versions of TechReborn.

 

Version 1.4.7

  • Fixing issue #109 where our coremod was incompatible with SpongeForge due to extending DummyModContainer.

Version 1.4.6:

  • Added targeting for use with entity callbacks. The following targets are available; only one may be specified per callback:
    • area: Targets a given area, in meters, around the player
    • hostile: As area, but only targeting hostile mobs
    • animals: As area, but only targeting animals
    • players: As area, but only targeting players
    • target: Specify a particular target; currently only 'original' supported, to target the entity that triggered the event
    • multitarget: Used to combine any number of the above; also supports matchers.
    • except: Can only be used when multitarget is specified; any targets matched here will be taken out of the list. Similarly supports matchers.
  • Added a 'targetEntities' callback for tile entities, will allow for a target modifier (above) to be declared and will run a set of entity callbacks on each entity matched by the target modifier. See the wiki for more.
  • Adding support for Calendar API, and a calendar and temperature system in general, with the following matchers, available for most everything:
    • calendarIsSeason: Checks to see if it is currently the given season.
    • calendarIsDayOfYear: Checks to see if it is currently the given day of the year, based on your config.
    • calendarMinDayOfYear: Checks to see if it is currently at least the given day of the yar.
    • calendarMaxDayOfYear: Checks to see if it is currently at most the given day of the year.
    • temperatureMin: Checks to see if it is at least the given minimum temperature.
    • temperatureMax: Checks to see if it is at most the given maximum temperature.
    • temperatureInternalMin: Checks to see if an entity has a minimum internal temperature.
    • temperatureInternalMax: Checks to see if an entity has a maximum internal temperature.

    The last two are not supported by Calendar API, and, as such, will return the same as temperatureMin/Max, they are simply in place for mods which do provide a way of tracking and distinguishing such things.
  • Adding the ability to control Tinker's Construct drying rack recipes with:
    • TConstruct.addDryingRecipe
    • TConstruct.removeDryingRecipe
  • Fixing issue #107 where the Blood Magic Alchemy Array integration wasn't actually using the proper alchemy circle renderer when isBinding was set to true.

 

Version 1.4.5:

  • Adding a new 'addTileEntityEvent' operation, and the ability to perform a (at this time) limited number of events on ticking tile entities (furnaces, chests, etc) based on the matcher system.
  • Adding support for Botania Unofficial, with the following operations:
    • Botania.addPetalRecipe
    • Botania.addPureDaisy
    • Botania.addManaInfusion
    • Botania.addRunicAltar
    • Botania.addElvenTrade
    • Botania.removePetalRecipe
    • Botania.removePureDaisy
    • Botania.removeManaInfusion
    • Botania.removeRunicAltar
    • Botania.removeElvenTrade
  • Fixing issue #97 where the 'reloadQuestCache' command didn't ever get added, but was referenced in the help text for the questing subsystem.
  • Fixing issue #104 where the applySet/removeSet/reload commands could cause concurrent modification problems.
  • Fixing issue #105 where the sky color stuff from the previous version wasn't working outside of the dev environment. Sorry about that!

 

Version 1.4.4:

  • Added an 'otherwise' parameter to 'setMobDrops', 'setBlockDrops', 'addMobShed', 'addMobPotionEffect', and 'addEntityEvent' so that, when a match fails, you may set up an alternate drop/potion effect/event.
    • This is useful primarily for replicating drop situations like gravel, where there's an N% chance of finding flint, but it should otherwise drop gravel.
    • Each 'otherwise' entry is a full entry in itself, so it can have its own matchers, and its own 'otherwise', in case you want to continue chaining them. Remember that too many chains will begin to impact performance.
  • Added HQM and Better Questing integration; both use a standard set of matchers/callbacks to promote portability between the two mods. The following matchers are available for 'setMobDrops', 'setBlockDrops', 'addMobShed', 'addMobPotionEffect', and 'addEntityEvent':
    • questingIsHardcore: Takes a single boolean parameter, determining if it should be valid when/when not in hardcore mode
    • questingInParty: Takes a single boolean parameter, determining if it should be valid when/when the player is in a party
    • questingHasSharedLoot: Takes a single boolean parameter, determining if it should be valid when/when the player's party has shared loot
    • questingHasSharedLives: Takes a single boolean parameter, determining if it should be valid when/when the player's party has shared lives
    • questingQuestStatus: Matches a given quest's status by its name (must be unique) and status, optionally against Any/All players online.

    Additionally, the following callbacks are made available:
    • questingGiveLives: Gives the target player/party one or more lives.
    • questingTakeLives: Removes one or more lives from the player/party.
    • questingCompleteQuest: Completes all objectives for the named quest, and allows the player to claim any rewards.
    • questingResetQuest: Resets all objectives for the named quest, requiring completing them again prior to turning in the quest.
  • Added matcher 'isSleeping' to addMobShed, addMobPotionEffect, and addEntityEvent. This checks to see if the entity in question is a player, and if they are currently in a bed (or not, if set to false).
  • Added an operation 'setSkyColor', as well as callbacks 'setSkyColor' and 'revertSkyColor' in order to allow you to change the sky color of a given dimension.
  • Improved how mob and block drops were calculated to ease some of the burden during processing.
  • Teleport callbacks will actually run some safety checks on the target area prior to teleporting things, by default. Added the optional parameters 'unsafeTeleport' (defaults to false) and 'safeRadius' (defaults to 5 blocks) to control this functionality.
  • Fixing issue #92 where the 'teleportSpawn' callback was a bit off in doing cross-dimensional teleports. By a lot.

 

Version 1.4.3:

  • Adding entity event support, so that you can apply more generic events entities based on the matcher system. By default, no entities will have events, and all events have to be added using the 'addEntityEvent' operation.
  • Adding new Settings.cfg entry 'I:TicksBetweenEntityEvents' which determines the number of seconds between the event code running. By default, this is 5 to help with TPS.
  • Added two new scoreboard matchers ('isScore' and 'rangeScore') to allow users to more easily match scores.
  • Added an optional 'player' specifier to all scoreboard matchers, which allows the following:
    • Not specified / empty string: The current player/entity must match the criteria.
    • 'All': All players must match the criteria.
    • 'AllOnline': All online players must match the criteria.
    • 'Any': Any player must match the criteria.
    • 'AnyOnline': Any online player must match the criteria.
    • Any other string: The specified player (or dummy entry) must match the criteria.
  • Added two additional (optional) parameters for all scoreboard matchers:
    • defaultValue: If the an entity doesn't have a scoreboard entry, use this value as the default value; this defaults to 0. This is useful if you need to test within a given range that includes 0, but don't want entities who have no score at all to match.
    • create: If an entity doesn't have a scoreboard entry, create it if this is flagged as true; this defaults to false.
  • Added the 'BloodMagic.addImperfectRitual' operation to allow users to create new imperfect rituals that can have callbacks for their effects. See the wiki for more information.
  • Added initial support for AbyssalCraft with the following operations:
    • AbyssalCraft.addCrystallization
    • AbyssalCraft.removeCrystallization
    • AbyssalCraft.addTransmutation
    • AbyssalCraft.removeTransmutation

    More to come later.
  • Added support for a few new bits of top level information for sets:
    • duration: A number of ticks for which the set should be applied.
    • cooldown: A number of ticks after the set has been removed during which it can't be re-applied.
    • removesSets: An array of set names that should be removed when this set is applied.

    See 'custom2' in default.json.sample for more details.
  • Fixing issue #88 where matchers were being checked in the opposite order they should've been, causing more expensive checks to be run first.
  • Fixing issue #89 where applied sets were being saved when they shouldn't, and not being saved when they should.

 

Version 1.4.2:

  • Adding the ability to add/remove recipes from Blood Magic's Alchemy Table using the following operations:
    • BloodMagic.addAlchemyTable
    • BloodMagic.removeAlchemyTable
  • Adding support for 'cooldown' matcher for setBlockDrops, setMobDrops, addMobShed, and addMobPotionEffect. This will allow you to specify a set number of ticks (minimum) that have to pass between the entry being valid.
  • Adding support for 'isRaining', 'isStorming', and 'isSnowing' matchers for setBlockDrops, setMobDrops, addMobShed, and addMobPotionEffect. These can be configured not only to check for the presecne of the weather in the world, but also if the target is in the right biome, or if the weather is happening at their position (ie: not underground when raining).
  • Adding support for 'playerHasAchievement', 'minStat', and 'maxStat' matchers for setBlockDrops, setMobDrops, addMobShed, and addMobPotionEffect.
  • Adding multiple callbacks for addMobPotionEffect operations. You may now specify a set of events for:
    • onNew: When the potion is first applied to the entity by the operation.
    • onExtended: When an existing potion's duration is extended by the operation
    • onApplied: When either a new potion is applied or the duration is extended by the operation; this is called after onNew/onExtended are called, and is intended for any shared code you would want to run.
    • onExpired: When the potion created by this operation is removed because its duration is 0 or less.
    • onCured: When the potion created by this operation is cured by using a curative item (or through a command).
    • onRemoved: When the potion created by this operation is removed by expiring/being cured; this is called after onExpired/onCured are called, and is intended for any shared code you would want to run.

    Each of these can take an array of callbacks to run when the event occurs. At current, only two types of callbacks are supported:
    • Running a command: You may run a command by passing in an object that looks like the below

      {
          type: "runPlayerCommand",
          command: "/say @p You've got some extra luck.",
          name: "The Server"
      }
    • Running a JavaScript function: You may also pass in a raw JavaScript function. The functionality for this is currently limited to logging, but will be expanded in a future release. An example of this would be:
      function(entity, world) {
          console.log(entity.getName() + "'s luck expired.");
      }
  • Fixing issue #68 where many of the drop entries were being duplicated in SSP, because the handlers were being registered on both the client and server.
  • Fixing issue #69 where addMobPotionEffect operations weren't getting removed, but re-added.
  • Fixing issue #75 where using composite matchers addMobPotionEffect operations would cause an NPE.

 

Version 1.4.1:

  • Adding mob potion effect support, so that you can apply potion effects to mobs (and players) based on the matcher system. By default, no mobs will have potion effects applied, and all effects have to be added using the 'addMobPotionEffect' operation.
  • Adding new Settings.cfg entry 'I:TicksBetweenPotionEffects' which determines the number of seconds between the potion effect code running. By default, this is 5 to help with TPS.
  • Adding new command '/ch getPotions' to list all available potions for use in operations.
  • Fixing issue #54 where ordering of tag lists mattered with fuzzy matchers.
  • Fixing issue #62 where the saved world data was assigning an immutable set where it shouldn't have and causing per-player operations (like starter inventory) to fail to realize they'd already been applied.
  • Fixing issue #65 where mob sheds couldn't actually affect players, despite that being the original intention.

 

Version 1.4.0:

  • Upgrading to Minecraft version 1.9.4 and Forge version 1909.
  • Lots of rework of the API and internal classes.
  • Cleaned up more logging.

 

Version 1.3.13:

  • Adding additional matchers for setBlockDrops, setMobDrops, and addMobShed. See the wiki for more info.
  • Adding ability to add starter items in base sets (default, peaceful, easy, normal, hard) with the 'addStarterItems' operation.

 

Version 1.3.12:

  • Adding mob shedding support. By default, no mobs will shed, and all sheds have to be added using the 'addMobShed' operation.
  • Adding new Settings.cfg entry 'I:SecondsBetweenSheds' which determines the number of seconds between the shed code running. By default, this is 10 to help with TPS.
  • Adding block drop controls, much like those used for mob drops; use the 'setBlockDrops' operation. There's a dirty example in the default.json.sample file that shows multiple uses, including the new composite matchers.
  • Adding new Settings.cfg entry 'B:LogMobDropEvents' which determines if block break events should be logged to help determine settings to use for the block drop controls.
  • Fixing issue #52 where items could be damaged/consumed when the event was cancelled by another matcher.
  • Fixing issue #53 where the fuzzy NBT check would fail when dealing with tag lists. Still not perfect, as order of enchants matter.

 

Version 1.3.11:

  • Fixing issue #45 where we were outputting an error message when a mod was missing, but still allowing its operations, and causing a class def error.
  • Fixing issue #46 where help was running every time, regardless of if a command was run or not.

 

Version 1.3.10:

  • Adding in TechReborn integration with the following operations:
    • TechReborn.addAlloySmelter
    • TechReborn.addAssemblingMachine
    • TechReborn.addBlastFurnace
    • TechReborn.addCentrifuge
    • TechReborn.addChemicalReactor
    • TechReborn.addCompressor
    • TechReborn.addExtractor
    • TechReborn.addGrinder
    • TechReborn.addImplosionCompressor
    • TechReborn.addIndustrialElectrolyzer
    • TechReborn.addIndustrialGrinder
    • TechReborn.addSawmill
    • TechReborn.addPlateCutter
    • TechReborn.addVacuumFreezer
    • TechReborn.removeRecipe
    • TechReborn.addFusionReaction
    • TechReborn.removeFusionReaction
    • TechReborn.addShapedRollingMachine
    • TechReborn.addShapelessRollingMachine
    • TechReborn.removeRollingMachine
  • Fixing issue #39 where /ch help did absolutely nothing.
  • Fixing issue #40 where the operations to remove Tinker's Construct smeltery casts could throw an NPE, and not match anything.
  • Updating Forge to recommended build 1887 and updating MCP mappings.

 

Version 1.3.9:

  • Adding ability to hide/show entries from JEI using the below commands, both of which can be used in custom sets to gradually display new blocks as the game progresses:
    • hide: Hide an item/block from the JEI list; note that recipes that use the item, or make the item, will still allow players to get to the item, so, if you really want to remove all signs of the item, remember to remove the recipes as well.
    • show: Show an item/block in the JEI list after it's been hidden
  • Per request updating setMobDrops to add the ability to:
    • Check if the target has a particular potion effect applied
    • Check if the attacker has a particular potion effect applied
    • Specify minimum (and maximum) looting level to get a particular drop
    • Add the ability to check if a particular item is in the attacker's offhand
    • Add the ability to check if a particular item is in the player's inventory (main inventory/hotbar)

    In addition, all spots which check if the attacker has a particular item have been updated to add the ability to consume the item or damage it by a set amount per drop that was generated.
  • Per request changing applySet/removeSet commands to:
    • Adds a --silent (alias: -s) flag you can pass to have the set be applied/removed silently, without notifying the user of the command, to deal with how BetterQuesting runs its commands.
    • Allow multiple sets to be applied or removed at once

 

Version 1.3.8

  • Per request added new setMobDrops operation to control what items mobs drop, will allow for:
    • Adding or removing a drop to a mob/set of mobs
    • Replacing an entire drop table with your logic
    • Replacements can exclude specific items (like Demonic Will from Blood Magic)

    Each drop entry can individually specify:
    • Set chance of each drop entry separately
    • Set quantity of each drop item betwen a min and max range
    • Add a bonus multiplier for looting (can also be negative)
    • Specify the damage source ('player', 'onFire', etc)
    • Specify that the attacker has to be using a specific item to cause the drop

    Additionally, drop tables can be overlaid on top of one another (ie: specify multiple tables affect a given mob), and can also be applied via custom sets.
  • The return of the Settings.cfg file; you can now set if the mod should log info about mob drop events, so that you can better figure out entity names and damage types.

 

Version 1.3.7

  • Adding the ability to change harvest levels on blocks and tools using the following operations:
    • 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.
  • Adding the ability to change stats on TiCon tools using the following operations:
    • setMaterialStats: Modifies the stats for a given material.
  • Adding the ability to set harvest level names for new/existing TiCon harvest levels using the following:
    • setHarvestLevelName: Adds a new name for a harvest level or modifies an existing one.
  • Harvest level names can be applied with custom sets as well, so, you could leave a harvest level as "Unknown" until the player reaches a certain point in progression where they should be able to mine it; optionally combine this with setting harvest levels to ensure the player really doesn't mine it until after that point.
  • Fixing issue #33 where the build server wasn't properly linking the Nashorn Scriping Library as a required mod when uploading to CF.

 

Version 1.3.6

  • Fixing issue #25 where a player connecting to a server could crash due to not having world data to save applied recipes to.
  • Fixing issue #26 where we were trying to reload JEI even if the player didn't have JEI installed.
  • Fixing issue #27 where the difficulty based sets were trying to be applied before the world finished loading and causing a CTD.
  • Standardized logging.

 

 

Version 1.3.5

  • You can now register more sets than just default; now 'peaceful', 'easy', 'normal', and 'hard' are valid options and will take effect when the singleplayer game/server is set to the associated difficulty level. See the sample file for more information.
  • You can also add custom sets as well, named anything other than 'default', 'peaceful', 'easy', 'normal', or 'hard'. These custom sets can be applied or removed with the /ch applySet setName and /ch removeSet setName command. These could then be associated with command blocks or quest mods that allow running commands, or simply run by a server op.
  • Updated to Forge 1865.
  • Fixing some issues with tab completion for commands.

 

Version 1.3.4

  • Fixing issue #22 where AddAlchemyArray was causing a loading error when loaded without Blood Magic installed.

 

Version 1.3.3

  • Adding the /ch listFluids command to list out the available fluids that are registered.
  • Adding in ability to add/remove fuels from the Tinker's Construct smeltery using the following operations:
    • addSmelteryFuel
    • removeSmelteryFuel
  • Adding in ability to add/remove basin and table casts for Tinker's Construct using the following operations:
    • addSmelteryTableCast
    • addSmelteryBasinCast
    • removeSmelteryTableCast
    • removeSmelteryBasinCast

 

Version 1.3.2

  • Adds in preliminary Blood Magic integration; adds the following:
    • 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
  • Adds the /ch getResourceLocator command to get the currently held item's resource locator and metadata for use in item strings.

 

Version 1.3.1

  • Adds in preliminary Tinker's Construct integration; allows adding and removing smeltery melts and alloys:
    • addSmelteryMelt operation: Add a melt.
    • removeSmelteryMelt operation: Remove a melt.
    • addSmelteryAlloy operation: add an alloy.
    • removeSmelteryAlloy operation: remove an alloy.
  • Fixing issue #11 where medium sized config files would fail to sync from client to server.

 

Version 1.3.0

  • Adds in a new '/ch reload' command, which will reload your configs from disk and sync them out to all connected players. Fixes issue #7.
  • Fixes issue #6 where logging in repeatedly without first closing your game would cause added recipes to be duplicated.

 

Version 1.2.4

  • Client will download configuration from server when connecting.
  • Fixes issue #5 where shapeless recipes with more than one of the same item would match with only one of the item, instead of all of them.
  • Fixes issue #4 where users couldn't actually specify the recipes they wanted to remove down to a single recipe/category.

 

Version 1.2.3

  • Fixes issue #3 where recipe removals were being processed before some mods were adding in their recipes and not actually removing anything.

 

Version 1.2.2

  • Moving Nashorn library out to a separate mod, so that other authors can use it.
  • Cleaning up some internal code.

 

Version 1.2.1

  • Adding scriptable onCraft function for more advanced things when crafting, such as adding a random chance of an item breaking when used in a craft.  See the bottom of the sample file for a better description.

 

Version 1.2.0

  • Adding in support for OnCraft things (returnOnCraft, replaceOnCraft, damageOnCraft, etc) for shapeless recipes as well.
  • Updating how shaped recipes return transformed item stacks to be less (not at all?) hacky; should make things a lot safer going forward, and seems to fix any lingering issues I was having with it.
  • Adding progress bars when processing config files, and when initializing and applying operations.

 

Version 1.1.3

  • Fixes Issue #1 where shaped recipes with returnOnCraft would create a phantom item in the crafting grid if the user tried to craft with a stack of the item to be returned.
  • Fixes Issue #2 where shaped recipes were having a problem being properly handled by the craft matching code to find special *OnCraft transforms.
  • Various improvements to how input items were build from their components.

 

Version 1.1.2:

  • Adding damageOnCraft (which, coincidentally, could also be 'heal on craft' if you provide a negative damage value).
  • Updating to Forge 1863
  • Fixing JEI integration on shaped recipes; mostly. NBT items have some issues; not sure if that's on my end, or I'm just working with bad data.  Do spawn eggs have metadata? I should add in a command to check.
  • Fixing ReplaceOnCraft only working when there was one item in the stack. Thank you ForgeHooks.

 

Version 1.1.1:

  • Fixing the issue from 1.1.0 where replaceOnCraft/returnOnCraft would apply that to every recipe that used the item in question (only for shaped recipes right now).
  • Lots of code cleanup and internal fixes; making a lot of things exposed to be added on to by other mods.

Version 1.1.0:

  • Updated to be Java 8 only.  Specifically, users should be using a minimum of 8u40.  Curse normally packages 8u25, so, in the meantime, I've embedded the library required.  This is going to result in a much larger download until this can be resolved.
  • Now utilizing the Nashorn JavaScript library to process our JSON files, this is going to allow for more dynamic configuration files, including scripting functionality.
  • Added the ability to specify items in a more verbose format; potentially less confusing for NBT.
  • NBT can now be specified as a regular JSON object anywhere that it was by itself (ie: not on the tail end of an item).
  • Added the ability to return an item to the player when used in a recipe (requires the expanded item format).
  • Added the ability to replace an item when it's used in a recipe (also requires the expanded item format).

Version 1.0.1:

  • Adding the ability to set display names on all added items.
  • Adding a command (/ch getHeldNBT) to return the NBT data from the item currently in your hand and send it to the console and back to you in chat (console is far more useful, but, in case you can't access your console... chat)
  • Adding the ability to set NBT data on all added items (shaped, shapeless, furnace, and brew recipes).
  • Updated forge version to 1858.

 

Version 1.0.0-beta:

  • First release I'm willing to consider a beta; everything included should work, but, I'll be the first to admit I haven't done nearly enough testing.
  • Added in brewing support; brew inputs can only be non-stackable items (water bottles, buckets, etc)
  • Added in ore dictionary support for shaped and shapeless recipes.
  • Added in ability to add items to an ore dictionary.

Version 0.6:

  • Added ability to add furnace fuels to the game with custom burn times.
  • Added documentation for existing ability to set experience levels for smelted items.
  • Changed how metadata matching works on items; if you used the mod:item:*:qty syntax before, you should update that to mod:item:0:qty.  Sorry for the trouble.
  • Fixed a crash bug that occurred in 0.5 when there was no config directory, because I removed the base config file from being generated for the moment.
  • API now requires that users extend BaseRecipeOperation instead of implementing IRecipeOperation, as this makes priority a standard property for all operations.

Version 0.5:

  • Added a priority system to how operations are performed so that users can override the base functionality that removes everything before adding anything.  Default priority is 0, higher numbers will go later in the process.
  • Simplified how operations are handled internally and added in an API for defining recipe operations (based on the JEI plugin system) so that other mods can hook into it and add their own operations.
  • Cleaned up a lot of internal code.

Version 0.4:

  • Added in the ability to add/remove furnace recipes.
  • Added in a more concise syntax for setting quantities.
  • Allow removal to specify metadata matching.
  • Added quality of life improvements around shaped recipes; recipes will automatically use the minimum amount of space necessary.
  • Added comments and more examples to the sample file.  Any entries starting with __ will be ignored when parsing the file (well, technically, they're just not fields on the models...) so you can use these as comments.

Version 0.3:

  • Added the ability to add in shapeless recipes.
  • Added in 'with' as an alias for 'shape' in the shaped recipe config format; shapeless only uses 'with'.

Version 0.2: 

  • Made it work outside of the dev environment (sorry; forgot to reobfuscate the jar...)
  • Added the ability to add in shaped recipes.

Version 0.1:

  • Added ability to remove recipes.

 

Modpack Usage Rules

Just to be more explicit about this, despite the license and it being up on Curse: yes, you may use it in any public or private modpacks, just please try and keep it as up to date as possible.  Release versions - which there will hopefully be some of soon - are preferred over beta versions (though I'll still need people doing beta testing); alpha versions will no longer be posted directly to CurseForge.

 

 

Source

This project is fully open sourced; feel free to help commit to it, comment on the code, etc at https://github.com/legendblade/CraftingHarmonics


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    243728
  • Created
    Apr 5, 2016
  • Last Released File
    Aug 5, 2016
  • Total Downloads
    310,669
  • License

Categories

Members