OpenMods / OpenPeripheral

https://openmods.info
MIT License
67 stars 25 forks source link

Thaumic Tinkerer Aspectalyzer "getAspects()" only lists the first one #204

Closed ghost closed 9 years ago

ghost commented 9 years ago

I'm trying to get a table with all the aspects in an item using the aspectalyzer, but I cant get them separeted. The command itself shows all the aspects in a single string, but if I try to serialize it or put it to a string, it's only showing the first aspect.

I'm playing 1.6.4, with the latest available versions of TT and OpenP.

Brazier85 commented 9 years ago

Hey,

i know this is an old comment but i had the same problem these days. Here is my solution:

if analyzer.hasItem() then
                if analyzer.itemHasAspects() then
                        local aspect1, aspect2 = analyzer.getAspects()
                        if aspect1 == "auram" then
                                if aspect2 == nil then
                                        content[slot]=aspect1
                                else
                                        content[slot]=aspect2
                                end
                        else
                                content[slot]=aspect1
                        end
                        print("Slot "..slot..": "..content[slot])
                else
                        content[slot]="none"
                end
        else
                        return false
        end
boq commented 9 years ago

Hmm, no, it doesn't looks like same issue. Actually, I'm not sure what this code is supposed to solve (getting list of aspects, excluding, um, filtered aspect on void jars?) and if it's even OpenPeripheral and not TT integration (I can't find itemHasAspects anywhere).

Anyway, old issue was probably user error. Which doesn't matter anyway, since MC 1.6.4 is no longer supported.