Misc Peripherals Bee Analyzer

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Yarma92

New Member
Jul 29, 2019
245
1
0
Hi guys I'm having trouble with the misc peripherals bee analyzer. I can seem to figure out just how to read the data it provides from the table it returns. Any advice would be much apprieciated.

yarma
 

voidreality

New Member
Jul 29, 2019
117
0
0
The two functions added with the analyzer are:

analyze(): Returns a table containing the data for the bee on its inventory slot.
isBee(): Returns whether the item on the inventory slot is a valid bee (analyzed or not).

EDIT: To read the values, something like this will work. Where t is the result of the analyze() function.

for key,value in pairs(t) do print(key,value) end
 

valhar2000

New Member
Jul 29, 2019
6
0
0
Assuming you have the bee analyzer in front of the turtle:
Code:
m = peripheral.wrap("front")
 
 
t = m.analyze
 
 
for key,value in pairs(t) do
 
  print(key,value)
 
end

That will write down all the information it gets about the bee.

If you want to look at specific information, you can do something like this:
Code:
print("Primary species: "..t["speciesPrimary"])

That will show you the primary species of the bee that was analyzed.

Be advised that the analyzer doesn't actually analyze bees, you have to use a beealizer for that. The analyzer simply reads the information about the bee into the computer. Also, you have to put the bee inside the analyzer, either manually, with pipes, or by instructing the turtle to transfer the bee from its inventory into the analyzer.