#(Isz) Count amount of crops at a certain age in an area

43 messages · Page 1 of 1 (latest)

proper flare
#

Title says it all. This is what I've got but can't figure out how to add the age in there.
<location[bla].find_blocks[sweet_berry_bush].within[50].size>

This doesn't work
<location[bla].find_blocks[sweet_berry_bush[age=2]].within[50].size>

Any help? Thanks.

timid tartanBOT
#

(Isz) Count amount of crops at a certain age in an area

timid tartanBOT
#

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>

subtle plank
#

would need a list filter

proper flare
#

I've tried many combinations of something like this but no luck
.filter_tag[<material.age.contains[2]>]>

robust knot
#
  1. .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

potent orioleBOT
# robust knot !t .equals
Cannot Specify Searched Tag

Multiple possible tags: <ElementTag.equals[<element>]>, <ElementTag.equals_case_sensitive[<element>]>.

robust knot
#

!t element.equals

potent orioleBOT
robust knot
#
  1. the filter tag is slightly wrong
#

!t filter_tag

potent orioleBOT
# robust knot !t filter_tag
Cannot Specify Searched Tag

Multiple possible tags: <ListTag.filter_tag[<dynamic-boolean>]>, <MapTag.filter_tag[<parseable-boolean>]>.

robust knot
#

!t list.filter_tag

potent orioleBOT
# robust knot !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.

Returns

ListTag

Examples
# 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]>]>]>
robust knot
#

note you need to use the special definition <[filter_value]> to get the specific value of each item in the list

lilac currentBOT
#
Thread Closing Reminder

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

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>

steel goblet
#

replace X for filter_value

#

denizen just handles that on its own

proper flare
#

I don't know what the filter value should be in this case. I thought something like
<location[<[bla]>].material.age>

steel goblet
#

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

proper flare
#

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

steel goblet
tall vessel
lilac currentBOT
#
Thread Closing Reminder

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