Refined Storage

Refined Storage

77M Downloads

Refined Storage API for OC - getItem

bufu1337 opened this issue ยท 6 comments

commented

How to search for a specific Item which has a tag?
for example output from crafttweaker: <"tconstruct:pick_head">.withTag({Material: "stone"})

i tried different ways with a refined storage system with only this item in it...

component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", withTag={material="stone"}}, true, true)
component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", Tag={material="stone"}}, true, true)
component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", nbt={material="stone"}}, true, true)
component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", meta={material="stone"}}, true, true)
component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", material="stone"}, true, true)

everything results in nil, but:

component.block_refinedstorage_grid_2.getItems()

finds it... but I cant use getItems() in my original system because it will result in a too long list

commented

can you give me an full example? no working:

component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", withtag={material="stone"}}, true, true) component.block_refinedstorage_grid_2.getItem({name="tconstruct:pick_head", tag={material="stone"}}, true, true)

commented

I suggest you go to the OpenComputers community, I don't use the integration myself so I can't help you.

commented

Note: the tag={} param probably wants an EXACT match, so not specifying all tags would be problematic.

commented

i wrote ther and the only answer was: go to refined storage, they can help you

https://oc.cil.li/index.php?/topic/1740-refined-storage-api-getitem/

commented

I gave you the answer in the post above you. The tag parameter requires ALL relevant tags, not only part of it.

If you still have more questions, please join our Discord or ask someone else on OC.

Like I said, I can't help you further.

commented

You want tag (lowercase), your examples list Tag with uppercase T.