#(oguzhan5585) tag to get any item in the game?

47 messages · Page 1 of 1 (latest)

vocal parcel
#

i want to drop any item in the game upon breaking a block. do i have to write down the id of every single item in the game or is there a simple tag that can maybe give me that and i can just pick a random one out of that?

fleet cargoBOT
#

(oguzhan5585) tag to get any item in the game?

fleet cargoBOT
#

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.

atomic nexus
vocal parcel
#

yes

atomic nexus
# vocal parcel yes

Im not quite sure but try this:
- drop <server.material_types.random[].parse[as[item]]>

vocal parcel
#

doesn't seem to work

#

invalid argument

atomic nexus
vocal parcel
#
[23:19:25 INFO]: Additional Error Info: Woah! Invalid arguments were specified!
                 Must specify something to drop!
[23:19:25 INFO]: +> [CommandExecutor] Usage: drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
[23:19:25 INFO]: +> [CommandExecutor] (Attempted: DROP <server.material_types.random[].parse[as[item]]>)
[23:19:25 INFO]: +---------------------+
[23:19:25 INFO]: Completing queue 'EXCOMMAND_0_OrganizedSole' in 627ms.`
atomic nexus
vocal parcel
#
[23:22:30 INFO]: Starting InstantQueue 'EXCOMMAND_8_NestesioMiniKiwi' with player 'Oguzhan5585'...
[23:22:30 INFO]: +- Queue 'EXCOMMAND_8_NestesioMiniKiwi' Executing: (line 1) drop <server.material_types.random.parse[as[item]]> ---------+
[23:22:30 INFO]:  ERROR in queue 'EXCOMMAND_8_NestesioMiniKiwi' while executing command 'DROP' with player 'Oguzhan5585'!
                 Error Message: Tag <server.material_types.random.parse[as[item]]> is invalid!
[23:22:30 INFO]: Additional Error Info: Unfilled or unrecognized sub-tag(s) 'parse[as[item]]' for tag <server.material_types.random.parse[as[item]]>!
[23:22:30 INFO]: Additional Error Info: The returned value from initial tag fragment 'server.material_types.random' was: 'm@pink_stained_glass_pane[faces=li@;waterlogged=false]'.
[23:22:30 INFO]: Additional Error Info: 'server.material_types.random.parse[as[item]]' is an unknown argument! This was probably caused by a tag not parsing properly.
[23:22:30 INFO]: Additional Error Info: Woah! Invalid arguments were specified!
                 Must specify something to drop!
[23:22:30 INFO]: +> [CommandExecutor] Usage: drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
[23:22:30 INFO]: +> [CommandExecutor] (Attempted: DROP <server.material_types.random.parse[as[item]]>)
[23:22:30 INFO]: +---------------------+
[23:22:30 INFO]: Completing queue 'EXCOMMAND_8_NestesioMiniKiwi' in 24ms.
atomic nexus
vocal parcel
#

still errors

#
[23:24:19 INFO]: Starting InstantQueue 'EXCOMMAND_12_WrSubmission' with player 'Oguzhan5585'...
[23:24:19 INFO]: +- Queue 'EXCOMMAND_12_WrSubmission' Executing: (line 1) drop <server.material_types.random> ---------+
[23:24:19 INFO]: Filled tag <server.material_types.random> with 'm@ice'.
[23:24:19 INFO]:  ERROR in queue 'EXCOMMAND_12_WrSubmission' while executing command 'DROP' with player 'Oguzhan5585'!
                 Error Message: 'm@ice' is an unknown argument! Did you forget quotes, or did you mess up the command syntax?
[23:24:19 INFO]: +> [Argument] Command usage: drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
[23:24:19 INFO]:  ERROR in queue 'EXCOMMAND_12_WrSubmission' while executing command 'DROP' with player 'Oguzhan5585'!
                 Error Message: Woah! Invalid arguments were specified!
                 Must specify something to drop!
[23:24:19 INFO]: +> [CommandExecutor] Usage: drop [<entity_type>/xp/<item>|...] (<location>) (quantity:<#>) (speed:<#.#>) (delay:<duration>)
[23:24:19 INFO]: +> [CommandExecutor] (Attempted: DROP <server.material_types.random>)
[23:24:19 INFO]: +---------------------+
[23:24:19 INFO]: Completing queue 'EXCOMMAND_12_WrSubmission' in 20ms.```
atomic nexus
#

right so it's getting a random material but it needs to pass it as an item

vocal parcel
#

yeah

#

this sometimes works and sometimes doesn't
<server.material_types.random.as[item]>

atomic nexus
#

hmm

#

does it give an error?

vocal parcel
#

yes

atomic nexus
#

can you paste it?

vocal parcel
#
[23:28:54 INFO]: Starting InstantQueue 'EXCOMMAND_33_PubliclyJustice' with player 'Oguzhan5585'...
[23:28:54 INFO]: +- Queue 'EXCOMMAND_33_PubliclyJustice' Executing: (line 1) drop <server.material_types.random.as[item]> ---------+
[23:28:54 INFO]: Applying property 'direction' on object of type 'ItemTag'...
[23:28:54 INFO]:  ERROR in queue 'EXCOMMAND_33_PubliclyJustice' while executing command 'DROP' with player 'Oguzhan5585'
                  For mechanism 'direction' with value 'NORTH', while applying properties to object 'i@soul_wall_torch'!
                 Error Message: Invalid mechanism specified: direction
[23:28:54 INFO]: Filled tag <server.material_types.random.as[item]> with 'i@soul_wall_torch'.
[23:28:54 INFO]: Did not specify a location, assuming Player's location.
[23:28:54 INFO]: +> Executing 'DROP': action='DROP_ITEM'  location='[email protected], 70, 41.097653588436856, 21.314461, 82.071777, world'  quantity='1'  items='[i@soul_wall_torch]'
[23:28:54 INFO]: Completing queue 'EXCOMMAND_33_PubliclyJustice' in 5ms.
atomic nexus
#

the heck

vocal parcel
#

if you place a torch on a wall it's a wall_torch. that does not exist as an item tho. but it transformed that material into an itemtag anyway

#

it should have just outputted soul_torch in this case

atomic nexus
#

my knowledge of denizen does not go this far. I hope someone else can help you with this one 😕

vocal parcel
#

but the <server.material_types> tag is definitely the key and helped me out. thank you for that one

lapis spireBOT
vocal parcel
#

i guess i could filter out anything that doesn't exist as an item with the filter tag...

fringe ferryBOT
keen shadow
#

!t is_item

brave skiffBOT
# keen shadow !t is_item

Returns whether the material is a holdable item.
Note that most blocks are valid items as well.
This only returns "false" for certain non-holdable "special" blocks, like Fire.

Returns

ElementTag(Boolean)

keen shadow
#

!t list.filter

brave skiffBOT
# keen shadow !t list.filter

Returns a copy of the list with all its contents parsed through the given tag and only including ones that returned 'true'.
One should generally prefer !tag ListTag.filter_tag.

Returns

ListTag

Examples
# Narrates a list of '3|4|5'
- narrate <list[1|2|3|4|5].filter[is_more_than[3]]>
vocal parcel
#

thx that's even better than what i was trying. i was doing some .is_truthy bs xD

keen shadow
#

Not sure if you even need .as[item] here, - give might work with materials as well? Though i can't test right now so up to you if you wanna give that a try

vocal parcel
#

i have <server.material_types.filter[is_item].random.item> now

#

so far that seems to work

#

but that could just be luck

keen shadow
#

Yeah no that seems right

#

I forgot material.item exists, it's better here than .as[item]

vocal parcel
#

ye

keen shadow
#

Anywho, feel free if you've got anymore questions :) otherwise

frigid sleetBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command 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.)

#

@vocal parcel