[1.7.10] AgriCraft

Discussion in 'Mod Discussion' started by InfinityRaider, Sep 12, 2014.

  1. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    A brief introduction;
    I was one of those people who actually liked the concept of IC2 crops, however I did not like the way it was implemented (completely Random).
    I am also one of those people who completely removed IC2 from his modpack in favor of Mekanism.
    I am also one of those people who likes HarvestCraft.

    So then this idea appeared; imagine IC2 crops, with a breedling line like Forestry bees/trees but with the HarvestCraft crops. Unfortunatly I had not a single clue how to mod Minecraft, after running around with this idea for some time, I decided to learn how to mod Minecraft using Forge, and Agricraft is the result of that.

    The Mod
    Agricraft aims to implement IC2 crops mutations for every crop out there, using the configs it should be possible to configure any mutation from any mod you want while also adding some farming equipment.
    It should also be possible to plant and harvest any seed from any mod on AgriCraft crops (one known exception is infused seeds from Thaumic Tinkerer).

    Mutations are the core mechanic of this mod. To mutate plants into other plants you first need to put some crops on farmland. If you apply crops to existing crops it will make it into a crosscrop. The more fully grown plants planted on crops next to a crosscrop the sooner a mutation will occur, mutations are actually crossbreeding of crops.
    The mutation happens this way:
    If there are at least 2 fully grown crops next to a crosscrop, a mutation can sprout on the crosscrop. This mutation is either one of the surrounding crops or a brand new one. Also the stats of the crop (growth, gain and strength) can increase (the more crops around a crosscrop, the higher the chance of stats increasing).
    The mutations follow this algorithm:
    1. Chance to mutate in a new plant (default 20%, can be changed in the config):
      1. Check surrounding crops and find possible mutations (specified in the configs, see later).
      2. At random, one of the found mutations is chosen (if there are no compatible mutations found, nothing happens).
      3. If the resulting mutation cannot grow on this spot, the plant will not sprout (for example, some plants require a base of a certain block, or another block near them).
      4. If the spot is favorable for the plant to grow, the mutation has a certain chance to sprout (depending on it's tier, the higher the tier, the lower the chance).
      5. You will see a new plant growing if the mutation was successful and new stats will be inherited based on the surrounding crops.
    2. Chance to sprout one of the surrounding plants (default 80%)
      1. At random one of the surrounding plants is chosen to sprout on the crosscrop.
      2. Just as with mutations, the spot has to be favorable for the plant to grow, else nothing will happen.
      3. Then the possible new plant has a chance to actually sprout, also depending on the tier. (these chances can be overridden in the configs, for example to balance out certain mods like Magical Crops).
      4. If everything went right you will see a new plant sprouting with new inherited stats.

    Adding custom mutations:
    in the /config directory you will find an agricraft folder containing a configuration file and a mutations file. The mutations file contains default mutations based upon what mods you enabled integration for in the configuration file (if you enabled mod integration for mods that aren't installed, it will not generate the defaults for those mods).
    If you wish to reload the default mutations, there is also a config option for that.
    Currently there are default mutations for: Vanilla, AgriCraft, Pam's Harvestcraft, Natura, Plant Mega Pack and Pam's Weee Flowers.

    Now if you wish to add/remove/customize mutations, you can do that in the mutations file. If you wish to add mutations for a mod that isn't implemented yet, that's possible, but you have to define the exact name from the itemRegistry for that seed. (you can use NEI to get these names)
    When you launch MineCraft, AgriCraft should ouput all registered mutations to the log. If you defined a name wrong you will see "null" in the mutations (example: "harvestcraft:cornseedItem = null + minecraft:seeds_wheat").

    This config file also contains instructions on how to specify these mutations or advanced mutations.

    The Journal
    This mod has support for NEI, meaning NEI can tell you all the mutations, but if you want to explore them yourself, you can disable this in the config. Then the journal will be your best friend, you will also need a seed analyzer, the journal and the seed analyzercan be crafted as follows:

    Next, put your journal in the dedicated slot in the seed analyzer. Now every seed you analyze will be written down in your journal. You can read information, the tier, growth stages, fruits and if you have discovered all the seeds required for a mutation (parent seed 1 + parent seed 2 = mutation) the mutations as well.
    If you wish to copy your journal, put it in a crafting grid with a blank book and quil. If you analyze a seed, you will also be able to tell what stats this seed has. The interface of the seed analyzer looks like this:

    Irrigation Systems:

    Irrigation systems consist of 3 components: the tanks for gathering/buffering the water, the channels for transporting the water and the sprinklers for actually irrigating the land.
    These components are crafted like this:

    The tanks and the channels can be crafted with any wood, however all the planks have to be the same material. The tank and the channel will look like the wood used to craft them.
    Tanks are multiblocks and will connect to other tanks placed next to them, tanks and channels only connect to other tanks and channels if they are made of the same material.
    Tanks are filled when it is raining, additionally you can also use other mods to pump water in them.
    Next an irrigation channel has to built from your tank to the spot you wish to irrigate. If the waterlevel in the tank is higher then the level in the channel, water will flow from the tank to the channel and vice versa.
    You can then attach sprinklers on irrigation channels, these will irrigate the farmland (you no longer need a water source nearby) and will speed up the growth of plants.
    If you don't like irrigation systems you can disable this in the config.

    Other Features:
    To maximize the synergy with other mods, there is a config file to blacklist seeds from being planted on crops as well as a config to override spreading chances for seeds (these files contain instructions how to do this).
    You can also add in your own crops, first set the option to create custom crops to true in the main config. Next the mod will generate a new file where you can specify your custom crops. This file also has instructions on how to specify the crops.
    Next this mod has support for the MineFactory Reloaded harvester and Thaumcraft harvesting golems. Meaning you can automate the harvesting of crops.
    AgriCraft also has some world gen: it will generate greenhouses in villages containing random crops (as can be seen in the screenshots).
    Finally the mod also provides some resource crops, these generate resources (gold nuggets, redstone dust, ...). In order for these plants to grow, they need a base of the corresponding ore (as seen in the screenshots). When AgriCraft detects other mods that add metals (aluminum, tin, copper, lead, ...) it will also add in crops for that.
    Both these features (greenhouses and resource crops) can be disabled in the config.


    Great spotlight from @Haighyorkie

    How to: AgriCraft in the Regrowth pack, video from BR Live Games

    Download: (requires Forge or up)
    Releases: http://minecraft.curseforge.com/mc-mods/225635-agricraft
    Downloads marked with R (Release) should be stable, downloads marked with A (Alpha) are test builds with bugfixes and new features.

    Source code:

    -ADDED: Nitor Wart: a new crop that produces glowstone dust
    -CHANGE: Renamed Mushroom Seeds to Spores
    -CHANGE: Sprinklers are now less laggy
    -FIXED: Various crashes related to analyzed seeds in the journal after removing mods
    -FIXED: Unable to plant crops on soul sand
    -FIXED: Broken scythes will no longer harvest crops
    -FIXED: Blacklisted seeds bypass disabling of Vanilla farming correctly

    -ADDED: Hand Rake tool which, when enabled, is the only thing that can remove weeds
    -ADDED: A config option to change the maximum stat cap on crops
    -ADDED: A config option to divide the stats on a newly mutated crops
    -ADDED: A config option to let the cactus crop produce cactus blocks instead of cactus green
    -ADDED: Villagers for the greenhouse (Elec332)
    -ADDED: MineTweaker3 support for changing growth requirements
    -ADDED: Compatibility with Jaquadro's GardenStuff (crops can be planted on them
    -ADDED: zh_CH.lang (3TUSK)
    -ADDED: Support for psychedelicraft (Will work when the newer version of Psychedelicraft is released)
    -ADDED: Other mods can make their seed/fruit compatible by registering the seed as "seed<YourPlantName>" and the fruit as "crop<YourPlantName>" to the ore dictionary
    -ADDED: The particle setting will now decrease the number of particles from the sprinkler
    -CHANGE: The background of the seed portrait in the journal is now the required soil
    -CHANGE: You can now specify any block as a specific soil for custom crops
    -CHANGE: Adding cross-crop sticks won't clear weeds anymore
    -CHANGE: Overhauled the way mutation requirements work: instead of setting specific requirements for mutations, you now have to set specific requirements for growing.
    -CHANGE: The requirement for a mutation to happen is the same as for growing: A plant can only mutate if it can grow there
    -CHANGE: NEI will show the needed soil and required base block (if any) for mutations
    -CHANGE: Potatoes sometimes drop poisonous potatoes now
    -CHANGE: Register seeds and their produce as seed<Name> and crop<Name> in the ore dictionary
    -CHANGE: Spreading from only 1 crop will not cause any stat increases (unless toggled in the config)
    -CHANGE: Added a difficulty for increasing stats in the config. 1: all surrounding crops will affect stat increase. 2: Only parent/identical crops will affect stat increase. 3: Same as 2, but other crops will affect stat inheritance negatively
    -CHANGE: Made the recipe for crops shaped to prevent conflicts with buildcraft wooden gears
    -FIXED: Sprinklers no longer hate railcraft hidden blocks
    -FIXED: Moved Botania crops to post init to possibly fix the crops not dropping petals
    -FIXED: Nether wart not being recognised as a valid seed (Marcin212)
    -FIXED: Sprinkler not stopping when water in the channel above ran out
    -FIXED: Waila not showing accurate fluid levels for channel, tank and valve
    -FIXED: Fixed crop not re-rendering on changes
    -FIXED: Stats are now being reduced on mutating instead of spreading
    -FIXED: Seeds being able to be planted on unhydrated farmland while farming was disabled
    -FIXED: NEI mutation GUI ignoring soil meta value
    -FIXED: Infinite loop when specifying BaseBlock of type 2
    -FIXED: Moved resource crops to post-init to enable resource crops for mods that register their ore dictionary entries too late
    -FIXED: Cactus crop dropping cactus with metadata 2 if the config option was on
    -FIXED: Crash with CoFH
    -FIXED: (hopefully) Fixed weird ingot to nugget recipes getting registered
    -FIXED: Nether wart always yielding one fruit, regardless of gain level

    -ADDED: TConstruct scythes can be used for aoe harvesting (right click on crops to aoe harvest)
    -ADDED: Cactus and mushroom crops
    -ADDED: Configurable instant-growth for magical fertiliser
    -ADDED: Crops for botania's petals
    -ADDED: Growth rate configuration for sprinkler
    -ADDED: The option to set the soil for a custom crop (this will require you to add one argument to all your custom crops)
    -ADDED: The option to add and remove fruits from custom crops with minetweaker (multiple fruits have are weighted)
    -CHANGE: Crops can now be applied on sand and soul sand by default
    -CHANGE: Seeds now require the correct soil when being planted on a crop
    -CHANGE: Soil whitelist: whitelisted soils only apply to crops that need farmland
    -CHANGE: Crops will follow Hunger Overhaul's rules (Squeek502)
    -FIXED: Hard runtime dependency on Botania
    -FIXED: Seeds with identical stats sometimes not stacking
    -FIXED: shapeless custom wood recipes not working correctly
    -FIXED: Vanilla farming only disabling for farmland
    -FIXED: Lag issues regarding the irrigation system (still being looked at)
    -FIXED: Seed duplication bug involving the Seed Analyzer

    -Changed AgriCraft creative tab logo
    -Fixed certain crops rendering crooked
    -Fixed crop lighting
    -Changed Sprinkler to use a fixed configurable amount of water
    -Added channel valves to irrigation systems
    -Overhauled irrigation systems: sprinklers will keep consuming water but there are now valves to close channels
    -Added configuration GUIs for some config categories
    -Fixed water draining bug in irrigation systems
    -Added option to clear all registered seed drops
    -Added support for Chococraft gysahls
    -Added a config to override seed tiers
    -Made Magic Fertiliser from Magical Crops work on tier 4 & 5 crops (can be disabled in the config)
    -Botania Horn of the Wild will no longer wipe crops away, instead it will clear them
    -Added a config option to disable weeds from taking over plants (they will still spread to nearby empty crops)
    -Added Minetweaker support for various aspects of AgriCraft. Check the GitHub wiki for documentation.

    -Fixed Null Pointer Exception in certain cases when breaking tanks
    -Fixed config reading bug
    -Custom Plants will now correctly drop their fruit if their fruit is a seed
    -Plants rendering in a cross will now render 4 smaller plants again
    -PMP & Natura crops now render with the correct icons again
    -Moved custom crops registering to post init to allow other mod items (which might register in init) to be used as drops
    -Instead of crashing the game, faulty config entries will be pointed out in the log (back up your old configs and enable regenerate defaults in the main config)
    -Updated the NEI handler to show required blocks below/near
    -Added a config to specify fertile soils for crops

    -Rewrote rendering code to improve performance
    -Fixed gardening trowel bug
    -Changed Hunger Overhaul compatibility (you need to update HO to newest version as well)

    -Fixed crash when disabling vanilla farming
    -Fixed servers kicking you out when breaking tanks
    -Network optimization for irrigation systems (marcin212)

    -Fixed shift-clicking crops crash
    -Water residue after breaking a tank now flows
    -Fixed a spelling error in the en_US.lang file
    -Disabling Vanilla farming in the config actually disables Vanilla farming
    -sprinkler now uses oak planks as breaking particles instead of missing textures
    -tanks will never fill up in deserts (it can rain in deserts apparently, but it doesn't render the particles)

    -Waila and magnifying glass only show stats of analyzed plants
    -Sprinklers consume less water and irrigate plants much much slower (it was quite op before)
    -Changed the way custom wood recipes are handled, they now show up in NEI
    -Sprinkler now always drops the right item
    -Tanks, channels and sprinklers are no longer destroyed in one hit
    -The math behind irrigation systems is now correct
    -Made irrigation systems less network intensive
    -In the journal, when a fruit is a block, it now loads the texture correctly
    -Fixed some crop rendering derps (Marcin212)
    -World gen blocks no longer generate in greenhouses
    -Added weeds

    -Fixed crash if OreDictionary planks weren't blocks
    -Underped resource crops in the configs
    -Rewrote mutations
    -Added special mutations: either require a specific block near or a base block in order to mutate
    -Set magical crops seeds to tier 4
    -Added Waila integration for crops, tanks and irrigation channels
    -Added gardening trowel: can be used to move plants from one corp to another
    -Added magnifying glass: use to inspect crops

    -Config option to get more crops per crafting operation
    -Added support to translate the journal to other languages
    -Fixed a crash with GregTech installed
    -Fixed derpy directory on Linux
    -Railcraft Hidden Blocks no longer prevent crops from being placed
    -Added a config file to override mutation chances for seeds
    -Fixed Seed Analyzer crash
    -Added a config file to blacklist seeds
    -Higher tier seeds will now mutate with lower chances and spread a lot slower to adjacent crosscrops
    -Added language support for tooltips
    -Added greenhouses to villages (can be disabled in the config)
    -Added MFR integration
    -Upgraded Forge to 1230
    -Added Thaumcraft integration (golem harvesting and aspects)

    -Fixed not being able to interact while having seeds in hand
    -You now no longer need an empty hand to harvest crops
    -Added config option to disable vanilla farming (default is false)
    -Finished irrigation systems
    -Fixed tanks & irrigation channels always dropping oak wood versions when harvesting them
    -Added default mutations for Pam's Weee Flowers
    -Added recipes to convert Ex Nihilo seeds to AgriCraft seeds
    -Added Plant Mega Pack integration and default mutations
    -Changed the recipe for wooden bowls to use slabs (it overlaps with irrigation channels)
    -Added config option to disable irrigation systems
    -Added French translations (Mazdallier)

    -Further work on irrigation systems
    -Changed some methods for dropping seeds and fruits in the world when harvesting crops
    -AgriCraft should now be compatible with Hunger Overhaul
    -Fixed duping bug with Hunger Overhaul installed
    -Fixed bonemeal not working with Hunger Overhaul installed

    -Added a config option to disable forcing a mutation by using bonemeal on a crosscrop
    -Finished water tank multiblock logic
    -Added a config for registering seeds to drop from tall grass
    -Fixed having to look at a block to open the Agricultural Journal
    -Seeds that have been analyzed or have been planted on a crop can no longer be planted on regular farmland
    -Finished water tank rendering: the tank renders using the texture from the wood used to craft it
    -Fixed trying to configure mutation NEI recipe handler serverside
    -Updated to forge
    -Changed some things in my TileEntity classes (I suggest you remove your crops and seed analyzers from your world before updating)

    -Somewhere a bug creeped in where planted seeds would immediately be fully grown, this is fixed now
    -Fixed a bug where crosscrops would mutate in no plant
    -Started work on irrigation systems: added tanks (code is there, they are not registered yet)
    -Actually runs on servers now
    -Added default mutations for resource crops for non-vanilla resources
    -Changed Harvestcraft & Natura integration as well as resource crops to be enabled by default

    -Added journal
    -Fixed being able to bonemeal fully grown crops
    -Fixed a derp crash when one plant would get registered twice
    -Cleaned up some code (it's still a mess, but just a little bit less of a mess)
    -Fixed opening Seed Analyzer gui pausing the game
    -Fixed some crops crashing the game while trying to harvest them

    -Added resource crops based on what ores have been registered in the ore dictionary
    -Fixed plants planted on regular farmland (outside crops) not dropping seeds (stats resetting not fixed yet)
    -Prevented Thaumic Tinkerer infused seeds from being planted or analyzed

    -Added additional rendering method
    -Fixed, under certain conditions, recipes showing up twice in NEI
    -Fixed planting Magical Crops seed crash
    -Fixed harvesting Magical Crops now yields the correct item
    -Looked into Growthcraft integration and it seems there isn't much to integrate
    -Fixed a bug where if you only specified 1 mutation it wouldn't be parsed
    -Added the ability to add your own custom crops
    -You now specify the mutations using the names for seeds you get from NEI
    -Added a correction method on the input (old mutation configs will still work)
    -Fixed Rendering and drops on Nether Wart

    -Fixed a bug where every seed could only mutate from a single set of unique parents
    -Added NEI integration
    -Added stat inheritance on mutations
    -Fixed being able to bonemeal empty crops
    -Added using bonemeal on a cross crop triggers a crossover
    -Added tooltips on seeds with initialized stats
    -Tweaked bounding box of crops
    -Reworked and cleaned up code
    -Added Seed Analyzer

    -Added default mutations for poppy, dandelion, melons, pumpkins & sugarcane
    -Fixed some minor bugs
    -Fixed plants rendering dark on crops
    -Hide crops from NEI
    -Added Natura integration
    -Added meta in mutation configs
    -Merged mutation configs in one file
    -Added config option to regenerate default mutation config

    -Initial build

    • @nimO for helping me out with the code and pointing out what and how something can be done better.
    • Pam for trusting me with her source code and support
    • Pahimar for making his code open source and for creating his Let's Mod Reboot Youtube series, I've learned a lot from this (also used some code, credits due where credits due)
    • NealeGaming for his Minecraft modding tutorials on youtube
    • VSWE for his "Forging a Minecraft Mod" summer courses
    • @kuenzign for his patience in testing the beta builds and coping with an excessive amount of crash reports
    • Mazdallier for the French translations
    Last edited: Mar 21, 2015
  2. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev


    -Added default mutations for poppy, dandelion, melons, pumpkins & sugarcane
    -Fixed some minor bugs
    -Fixed plants rendering dark on crops
    -Hide crops from NEI
    -Added Natura integration
    -Added meta in mutation configs
    -Merged mutation configs in one file
    -Added config option to regenerate default mutation config
    GreatOrator likes this.
  3. ewsmith

    ewsmith Well-Known Member

    oooooh... looks nice! :D
    as for world gen: perhaps seed packets in dungeons?
  4. Strikingwolf

    Strikingwolf Philosopher and Programmer FTB Mod Dev

  5. ChJees

    ChJees Active Member

    Oh mai. This is sexy.
  6. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    I'll throw in a config option for dungeon loot and drops from tallgrass (compatability is king, but configuratiblity is queen)

    anyway, NEI integration almost finished
  7. KaosRitual

    KaosRitual Popular Member

    Would it be at all possible to have something similar to the Apiarist's Database but for plants as an alternative to NEI? I like finding things out via experimentation rather than by hitting "R".
  8. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    yes, I've had this suggestion before, and I'm planning to add in an "encycropedia" (see what I did there?), a book wich will track all the plants you have obtained trough mutations. and NEI integration is toggle-able in the configs.
    JaRyCu, egor66 and BMB78 like this.
  9. madnewmy

    madnewmy Well-Known Member

    That actually looks fun :3

    When hunger overhaul updates to 1.7.10, will you be able to make it compatilible with it?
  10. ChatFawkes

    ChatFawkes Well-Known Member

    There are dev builds available for that.

    Also this mod looks quite interesting. As someone who also doesn't use IC2 anymore, I'm definitely gonna give this a try since the crop breeding looks fun.
    InfinityRaider likes this.
  11. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    I never used Hunger Overhaul's farming changes, so could you be a little more precise when you say compatible with Hunger Overhaul, because I really don't know what you mean, my apologies.
  12. madnewmy

    madnewmy Well-Known Member

    Hunger Overhaul basicly does 3 thing:

    Reduce or balance food saturation/meat stick gain
    Let's you hatvest with a sigle left click
    Changes plant growth (ex: all pam's harvestcraft have 3 state with HO: 0%,50% and mature while w/o HO they are like wheat)

    And the last fun is that it instantly kills you when your hunger bar runs out :3
  13. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    I know the changes HO does to food mechanics, but I didnt know what it did to farming. Basicly in my implementation you leftclick to destroy the crops (it drops a crop item, a seed and/or fruits if the plant was mature) and you right click to do a simple harvest (it drop fruit if it was mature) and sets the growth to an earlyer stage (kind of like Natura Cotton).
    btw, if I'm not mistaken, doesn't HO also change how bonemeal works?
  14. madnewmy

    madnewmy Well-Known Member

    Not 100% sure about that, it might be for trees
  15. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    If you mean compatible in that the foods produced by the crops will follow Hunger Overhaul's rules, then this will be the case because the plants will still produce the same items they were producing outside the crops. If you mean compatible in harvestmethod, then I'm going to have to deny that request.
  16. madnewmy

    madnewmy Well-Known Member

    I don't know if it's onyourside, but if HO is enabled, your crops would adapt to it
  17. InfinityRaider

    InfinityRaider sarcastic Jerk FTB Mod Dev

    I think I understand what you mean now, if I'm getting this right HO overwrites growing for every IGrowable? and if it's installed it would mess up my growing logic and I should implement some way to prevent that?
  18. squeek502

    squeek502 TiCon Tooltips Dev FTB Mod Dev

    No, Hunger Overhaul for 1.7.10 doesn't overwrite anything. It uses hooks added by AppleCore to cancel onUpdate calls, therefore delaying plant growth.

    There's not much you have to do to be compatible with Hunger Overhaul. Basically, it's Hunger Overhaul that'd need to add support for your mod rather than the other way around.
    InfinityRaider likes this.
  19. madnewmy

    madnewmy Well-Known Member

    well I def know nothing about modding
    *leaves on the walk of shame*

    pssst ask him to add compability
  20. Hoff

    Hoff Tech Support


    My extreme hate for IC2 and love of IC2 crops can now co-exist properly.
    Elec332, goreae, baddaspig and 4 others like this.

Share This Page