Mods that allow for automated harvesting
InfinityRaider opened this issue ยท 63 comments
- Mine Factory Reloaded (harvester)
- Thaumcraft 4 (golems)
- Forestry (manual multifarms)
- Ender IO (farming station, requires Ender IO addons)
- Blood Magic (ritual of the harvest moon)
- Progressive automation (harvesters)
- RotaryCraft (fans)
- Buildcraft (robots)
- ComputerCraft/OpenComputers (peripheral proxy)
- Ancient Warfare crop farms
- Steve's Carts 2
- Botania (Drum of the Wild)
Any progress on Rotarycraft fans. I know the mod just updated to V8 and seems to have stabilized. Not sure how those fans harvest though
@lesdmark I just tried with the latests versions (AC 1.4.0b3 & RC V8g), still not work.
Sorry, off-topic, but @InfinityRaider did you noticed issues with the rendering of canola seeds in the seed chest and you're on, or nothing and I should run a test on my testbed modpack with the two mods to pinpoint the issue ?
@lesdmark Reika wants compatiblity on his side and he is working on it.
@kane-thornwyrd Canola Seeds return null whenI request an icon, that's why they aren't rendering
Thank you, that was a theory I had, that you confirm, I'll fill a proper issue on the concerned tracker.
looks like Reika added it in V9 hooray! This was one of the obstacles to the modpack I am designing out of the way.
I just released a new Ender IO Addons that has a Farming Station just for AgriCraft. I'd say that covers Ender IO.
I had a look at steve's carts, and it will be impossible without ASM, so Ive decided not to do it. If vswe ever makes an API, I'll reconsider.
I've added support on buildcraft BuildCraft/BuildCraftCompat#18 . This allows for stripes pipes to plant seeds on crops, and for robots to plant and harvest crops.
@Nirek-K slight problem with the current multifarm compatibility - the multifarm has a hardcoded list of valid soils so will not work with any soil defined as valid for agricraft other than those few that it knows. Any way it could hook into Agricrafts soil system to detect what is valid for farming agricraft crops?
Thanks to @HenryLoenwind an API is in the works (https://github.com/InfinityRaider/AgriCraft/blob/master/src/main/java/com/InfinityRaider/AgriCraft/api/v1/APIv1.java) this can tell you if a soil is valid. I wouldn't release anything using that API as it may change a bit before my next release.
Hello,
Thanks for your hard work, this mod is one of the things MC lacked for too long.
Here is a state of the thingamagig, in my modpack at least:
Test env.
MC 1.7.10
Forge 10.13.4.1492
Results.
Format.
- Mod Version | automation used(: comment)
Serious.
- MFR 2.8.1B1-127 | Harvester
- MFR 2.8.1B1-127 | Fruit Picker
- RotaryCraft V7f | Fan
- Progressive automation 1.6.27 | Planter
- Ancient Warfare 2.4.108-beta | Crop Farm
- BetterChest 1.1.1.9 | Harvesting Upgrade: harvest wheat, seeds and crops :/
- Ender IO 2.2.8.381 | Farming Station: harvest wheat, seeds and crops :/
- Thermal Expansion 4.0.3B1-218 | autonomous activator: work like a charm !
Silly tests, "just in case someone asked".
- Applied Energistic 2 rv2 stable | Import bus: because crops aren't inventories.
- Applied Energistic 2 rv2 stable | storage bus: because crops aren't inventories.
To be done.
- OpenComputers 1.5.15.31unniversal | Robot: never touched that mod suite, should work in theory given it may be a "fake player".
- PneumaticCraft 1.9.16-106 universal | Drone: never touched that mod, should work in theory given it may be a "fake player".
Pending pull request for an API for Ancient Warfare that will allow me to add compatibility for their farms:
P3pp3rF1y/AncientWarfare2#372
AW farms will be able to farm AgriCraft crops from build 11 and onwards:
P3pp3rF1y/AncientWarfare2#374 (comment)
Something seems to have broken the ability of golems to correctly harvest Agricraft crops with 1.4. They're now just happily breaking any crop sticks they see when they have the harvest core.
@thephoenixlodge, what version? Because its working fine for me:
http://puu.sh/jMDCh/c787893b54.jpg
1.4.0 beta 2. It's occurring reliably with regrowth, including in the 0.8.0 release.
here's a screenshot showing the little bugger even insisting on breaking an empty cropstick:
http://i.imgur.com/33PSJmB.png
Do you provide an API we can use to easily integrate AgriCraft crops into our harvesting or should we go the ProgressiveAutomation Route and implement it manually (which sounds like a bad thing)?
Related: sinkillerj/ProjectE/issues/1215
Thanks @asiekierka. I also just realized there is this. So probably can use that.
No clue, why i didn't check that subfolder earlier.
Glad you found it yourself, if you encounter issues with the api, don't hesitate to open an issue for it.
Hey guys. Love that you are all trying to make this work. Make no mistake, I'm no programer. Unless you count my artful logic arrangements made within Pneumaticcraft and SFM. But let me just lay out what I see as the problem that prevents truly automatic farming with AgriCraft, both large scale automated production and full-auto breeding.
Some of these mods can detect the presence of weeds. Very valuable, but very few can do it. Some of these mods can perform a fake player r-click, but not even all of them can do it with crop sticks or applied to crop sticks. They refuse to "place" an item when there is already an item there. Some can detect the growth stage of a crop, weeds or otherwise. And finally, some can detect just what will be returned if a crop is broken.
But there is not a lot of overlap with these features. A turtle can read growth but not weed vs. non-weed. It also has r-click issues. A drone can place or break sticks, but can't read the plant within. And when it is clicking blocks, it can't be told to specify what item to click with. SFM can tell when breaking a crop will give seeds or not, but can't tell if it is breaking a plot with weeds or just empty sticks that don't have seeds yet.
Frankly, I don't know what the answer is. Tweaking the automation mods to r-click better? or read deeper into the crop API and returning more values that the player can act on? Giving drones and others a few more IF-THEN options in their programing? Or maybe just have AgriCraft generate and supply more data. Not having read or understood the code, I'm not the one to ask. Just thought I'd lay these out in a somewhat reasoned order. Hope it helps to kill these incompatibilities one by one.
Cheers.
Strangely enough, Buildcraft Robot Harvesters can already recognize and break mature plants as long as they are planted on crops. However, the Planters cannot plant seeds on crops, only on tilled soil. As a result, the compatibility is incomplete. With my limited (read: zero) knowledge of java, I see two fixes:
- Allow Buildcraft Robot Planters to plant Agricraft seeds onto Agricraft crops (in addition to tilled soil)
- Allow Buildcraft Harvesters to harvest mature Agricraft plants grown on tilled soil (in addition to mature Agricraft plants grown on crops)
Is there anything that can be done here, or is this something to take up with Buildcraft?
I've looked at buildcraft some time ago, I'm a great fan of buildcraft and wanted robot integration a long time ago. There was no API for it though, so I didn't bother looking into it any further until the api updated.
And when you say breaking, you mean actually breaking (crops + the plant) or only the plant?
Both the crops and the plant, leaving the crops+essence(s)+seed(s) floating over an empty patch of tilled soil.
Also worth noting, the BC Robot Planter won't plant crops.
I am sure that BC can add API for custom harvesting robots behaviours. In case of AgriCraft harvester robot should only harvest ready plant making seed and crops stay growing on the ground.
Pinging @asiekierka as API is in his hands and @hea3ven as a robot master.
@HenryLoenwind what are you trying to do exactly? Sorry, I'm just not quite following you.
@Kubuxu I'll wait for that then
I'm looking from the machine side and I'm not quite sure what'd be the best (read: future safe) way to do:
isMature() (!IGrowable.func_149851_a?)
isWeeds()
isEmpty()
isCrossCrop()
removeWeeds() (fake-player right-click with rake?)
canTake(ItemStack seeds) (fake-player right-click and check is something was taken?)
harvest() (getDrops() and re-place crops?)
and static canBePlantedInCrops(ItemStack)/needsToBePlantedInCrops(ItemStack)
@HenryLoenwind means that from our side, what is the best way to plant and harvest crops that will continue to work in the future?
E.g. Since there is no API way of giving the crops a seed I've had to create a fake player and get that player to right click on the crops in order to plant the seed. The same for harvesting (fake planter right clicks and I grab anything that drops). For most of the other functions (weeds, empty, crosscrop) I'm directly reading the NBT data, which is probably not the best way of doing things. (https://github.com/Vanhal/ProgressiveAutomation/blob/master/src/main/java/com/vanhal/progressiveautomation/compat/mods/AgriCraft.java)
The reason why buildcraft robots (and a lot of other mods without adding anything special in) work for harvesting is that the agricraft crops DO implement the normal IGrowable functions that say when the plant is mature, so then the mod breaks the tile (which is the standard thing to do with vanilla crops).
Ye I'm aware of that, most of the code for this mod was written at a time where I had little to no experience with mcforge, I'll be rewriting the crop code in the near future and perhaps look at creating an api for them as well.
Thx Vanhal.
I actually played a bit with Agricraft and I noticed it even is more difficult, as the canTake() should return "yes", "no" or "yes, but only if the block below is tilled first"...
And if it wasn't apparent, I'm working on the Ender IO Farming Station.
The Farming Station looks at each block of the field. If it is empty (a.g. air) it tries to prepare the block below (e.g. by tilling) according to the needs of the seed item in the input slot, then tries to plant it. If it is not empty, it tries to harvest it using all available harvesters (wheat, trees, melons, ...). If that doesn't work, it tries to apply bone meal (if available).
So into this work flow I need to integrate Agricraft. The first step is the detection if a space on the field is empty. Here a Crops without plant needs to be "empty" and one with needs to be "full". Then the preparing step. It needs to know how to prepare the field for a Agri-Seed, e.g. place crops/use empty crops/till land below crops/... or just reject field space for this seed. The harvesting then needs to be able to "harvest" weeds, so it needs a way to detect them and remove them (using rakes in a machine tools slot). And actually harvesting a mature plant should not just break the crops. The "apply bonemeal" step can stay dumb, or it could skip applying bonemeal to crosscrops/empty crops. (However, crosscrops don't make much sense on a machine-harvested field.)
If you need anything to make your life easyer, feel free to either PR it in or ask me to add it in.
Ok, so I sketched out an API: https://github.com/HenryLoenwind/AgriCraft/commits/api
The actual implementation class is not yet implemented, but please have a look at it before I go any further.
I added a first draft of an implementation. It might need some tweaks* and much of of the actual code was guesswork.
(*) e.g. replace the List results with something that passes meta, too.
PS: And it's completely untested.
I'll probably do some coding this weekend, I'll fill in the gaps then.
P.S.
really appreciate the effort, thanks.
It would be fun to see ComputerCraft support in the way of allowing the crop to be an interface so that a computer/turtle can not only harvest the crops but also read the strength/growth/gain values from the crop. It would allow for people to write incredible programs to automate farming and seed breeding.
I like that idea, but I don't like your implementation, I'll think about adding in a new block to make computers read crops.
@InfinityRaider that is cool idea. If I was designing such block I would made it to go above plants and scan at least 3x3 area. Build-in light source wouldn't be bad too.
So many ideas popping into my head now, i'll see what it turns out to be, first have to fix a pile of bugs and finish the seed storage :3
As you said, i didnt say it regarding the auto harvesting but rather the auto breeding. There are so many crops provided the right mods and its basically too much to do manually, especially with weeds on. I have given up on creating some high end seeds just because it takes up time. Also, im the kind of person taht automates something first rather than do it manually, even if manually is faster xD
Wait, can't CC/OC turtles "dumb" harvest crops? They have a generic fake player use action that you can aim. Does this not cause a mature crop to be harvested? While a peripheral proxy would certainly be nice, I don't see that the bot needs to know anything, just periodically walk the crops and try to harvest each one. In fact, if I don't miss my mark, it should even be able to "use" a seed on a crop, which should plant on an empty drop and harvest a mature crop.
Dangit, I'm supposed to be writing quests for my pack, not theorycrafting turtles and agricraft :P
Fake players should work, but a peripheral proxy that reads crops allows for complex programs to automate breeding to a certain crop.
Orchard will harvest any that are mature, and resets them to seedlings, the cropsticks/plants need to be built by hand the first time.