#(Isz) Count amount of crops at a certain age in an area
43 messages · Page 1 of 1 (latest)
(Isz) Count amount of crops at a certain age in an area
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
would need a list filter
I've tried many combinations of something like this but no luck
.filter_tag[<material.age.contains[2]>]>
- .contains is to check if a list contains an element. this is not what you need, you need to check if one value equals another, that would be
!t .equals
!t element.equals
Returns whether the element is equal to another element.
Equivalent to if comparison: ==
You should never ever use this tag inside any 'if', 'while', etc. command.
comparison
ElementTag(Boolean)
!t list.filter_tag
Returns a copy of the list with all its contents parsed through the given input tag and only including ones that returned 'true'.
This requires a fully formed tag as input, making use of the 'filter_value' definition.
ListTag
# Narrates a list of '3|4|5'
- narrate "<list[1|2|3|4|5].filter_tag[<[filter_value].is_more_than[3]>]>
# Narrates a list of '4|5'
- narrate "<list[1|2|3|4|5].filter_tag[<list[4|5].contains[<[filter_value]>]>]>
note you need to use the special definition <[filter_value]> to get the specific value of each item in the list
Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@proper flare
I just cannot get it to work
So I need a fully formed tag to you here X is?
<location[bla].find_blocks[sweet_berry_bush].within[50].filter_tag[<[X].material.age.equals[2]>].size>
I don't know what the filter value should be in this case. I thought something like
<location[<[bla]>].material.age>
what
no
its really just filter_value
yknow how in foreach, you can use as:input and then just use that as a definition?
same idea
Ffs that is not clear at all, it says This requires a fully formed tag as input which made it sound like filter value needed to be a fully formed tag which you can then say equals[2]
Ok seems to work now thanks
Don't think I would've ever got there on my own
tbf you just gotta look at the examples on the meta, its really easy to understand the logic on them
thats why the meta has usage examples
Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@proper flare