This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Dewey's profile picture

OpenBee Program & AE2 Integration - Humbly Requesting Help in Calling Inventory of AE Network

Started by Dewey, 31 October 2015 - 10:00 PM
Dewey #1
Posted 31 October 2015 - 11:00 PM
Good evening Crafters!

I am having a challenge updating a CC program known as OpenBee (credit:McLeoPold) to include functionality for using AE2's networking capabilities. The attempted goal is to use the storage system of AE2 in place of manual chests. Because there are so many wonderful bees in the world, having access to a larger storage system than chests can provide unlocks new and exciting opportunities.

The current code is located here on pastebin: http://pastebin.com/hDrN2xNV. In this particular code there is reference to another file called bee.config which allows the end Minecrafter to specify their local setup. Thankfully OpenPeripherals provides the ability to use a diamond chest by making use of a proxy but we have outgrown even a diamond chest at this stage.

This particular program allows the end Minecrafter to automatically breed bees together with target characteristics in mind such as temperature tolerances, life span, even whether or not to work at night!

Front side:


Back side:



In the current setup we are making use of an ME drive and ME controller; the idea here is to read the contents of the storage cell within the ME drive to get our bee information. Product from breeding the bees such as honeycombs drops into the bottom chest; unwanted critters are ditched into the top double wide chest.




The challenge with the current code is that instead of reading the contents of the storage cell which contains the bees, the program is instead reading the inventory of the ME drive which has a total of 10 slots. This is returning 0 bees found and the program prompts to add more bees to the system:



Curiously, the storage cell which was in the first slow of the ME drive is removed and stuffed into the "ditch" chest.


Is there a kind soul who could help me figure this out? We're on the edge of something new and exciting to expand the capabilities of this program and other Minecrafters will benefit as well!

Thanks in advance for your time and consideration.

Sincerely,

Deweyoxberg
Lupus590 #2
Posted 31 October 2015 - 11:30 PM
You can't put items into a AE/ME drive directly, you have to use an interface and connect the drive to the interface using ME cable.

You also need disks in the drive and power.
Dewey #3
Posted 01 November 2015 - 01:44 AM
You can't put items into a AE/ME drive directly, you have to use an interface and connect the drive to the interface using ME cable.

You also need disks in the drive and power.

An interface doesn't have the methods required about pulling inventory from the network.

There are storage cells in the drive and it does have power:
Curiously, the storage cell which was in the first slow of the ME drive is removed and stuffed into the "ditch" chest.

Good point though; I had forgotten about the movement of bees out of the network and back in. Sems this program just became a little more complex, like perhaps needing a second proxy to handle movement issues alone while the first proxy handles inventory query.
Dewey #4
Posted 05 November 2015 - 02:02 PM
Haven't yet managed to figure this one out. I have thought of automatically identifying all bees as they are available which would allow for stacking, but that still piles up in the diamond chest rather quickly with all of the possible variants.

Any thoughts out in Ask a Pro land?
Bomb Bloke #5
Posted 05 November 2015 - 11:48 PM
I gotta admit that my initial thoughts boil down to "this looks like a creative mode machine, why not just use creative mode?".

But I'm fairly familiar with bees, even if I haven't really put much time into the relatively more recent machines from eg Gendustry that take them from "way OP" to "are you kidding me?" territory.

(Heck, I don't even like using AE systems - they obsolete most every other form of storage, turning them into "magic blocks" that "do everything". That sort of gameplay just isn't fun. So I'm not so familiar with coding around them, though some friends did once get me to have a turtle extract items from such a system, and if memory serves I had to use some sort of export bus. If you send the turtle up to the drive thingy directly, then you're going to end up interacting with the disks, not their contents.)

Anyway, I store princesses next to an identical stack of drones. Any drones that deviate from their princess in any way get thrown out, at least, once any identical drones exist at all. (You might have some use for garbage drones in making liquid DNA or something, but you'll soon flood your tanks and there's no point in storing them at all after that.) If you find that a species is no longer required to mutate any new species, then store a queen and throw out all the remaining drones. That's about as efficient as it gets.

I'd imagine it's possible to manage bees in an Indexer, but I'm not sure how stable they are these days. Used to be that cramming too many bees into the things made them go haywire. I never needed to use one, as I found the Apiarist's Chest to offer way more storage than I'd ever want. Even if you can't directly interface with these via OpenPeripherals, you could at least use a piping system to direct finalised queens into them.