Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refined Storage API for OC - getItem #2028

Closed
bufu1337 opened this issue Oct 8, 2018 · 6 comments
Closed

Refined Storage API for OC - getItem #2028

bufu1337 opened this issue Oct 8, 2018 · 6 comments
Labels
question A question

Comments

@bufu1337
Copy link

bufu1337 commented Oct 8, 2018

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

@raoulvdberge raoulvdberge added the question A question label Oct 14, 2018
@raoulvdberge
Copy link
Collaborator

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

@bufu1337
Copy link
Author

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)

@raoulvdberge
Copy link
Collaborator

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

@raoulvdberge
Copy link
Collaborator

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

@bufu1337
Copy link
Author

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/

@raoulvdberge
Copy link
Collaborator

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question
Projects
None yet
Development

No branches or pull requests

2 participants