#() Inventory quantity of items
1 messages · Page 1 of 1 (latest)
Non-ASCII username for @manic crane has been overriden with a placeholder nickname. Please change to a readable+typable US-English ASCII nickname or username.
() Inventory quantity of items
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>
!mechanism itemtag.quantity
Changes the number of items in this stack.
ItemTag
ElementTag(Number)
<ItemTag.quantity> Returns the number of items in the ItemTag's itemstack.
<ItemTag.max_stack> Returns the max number of this item possible in a single stack of this type. F...
stone[5] would be five stone
Oh, I will try it thanks for fast response that should do the job, maybe I'm just a blind man
Ok so I tried this:
treasure_1_inventory:
type: inventory
inventory: CHEST
title: Treasure n.1
size: 27
gui: false
slots:
- [] [] [] [] [] [] [] [] []
- [] [] [] [bread] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
treasure_1_inventory_script:
type: world
debug: false
events:
on player opens treasure_1_inventory:
- inventory adjust slot:13 quantity:5
and it's not working, and I also tried this which also not works:
treasure_1_inventory:
type: inventory
inventory: CHEST
title: Treasure n.1
size: 27
gui: false
slots:
- [] [] [] [] [] [] [] [] []
- [] [] [] [bread[5]] [] [] [] [] []
- [] [] [] [] [] [] [] [] []
i typed this horribly wrong im sorry
quantity=5
it'd be bread[quantity=5] if you used it in the slot like you tried with my bad example
the event didnt work the way you expected because you used on instead of after
Oh yes I think now it should work properly but currently I'm out of my server so later today I will try it again thank you for help so far and don't worry everyone makes mistakes, main thing is that it will work after all, you can now consider it as solved thats probably all I wanted thanks again!

Also note that this is called property syntax, where you can specify mechanisms on objects, e.g. in this case you're using
!m ItemTag.quantity
Changes the number of items in this stack.
ItemTag
ElementTag(Number)
<ItemTag.quantity> Returns the number of items in the ItemTag's itemstack.
<ItemTag.max_stack> Returns the max number of this item possible in a single stack of this type. F...
bread is the item, and you're applying [quantity=5] to it
Mainly showing this so that you know how to search the meta for these in the future - can also specify multiple like [quantity=5;color=red], although if they get really complex should consider item scripts
!l Item Script
Item script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond
The following is the format for the container. Except for the 'material' key (and the dScript
required 'type' key), all other keys are optional.
<code>
The name of the item script is the same name that you can use to construct a new
ItemTag based on this item script. For example, an item script named 'sword_of_swiftness'
can be referred to as simply 'sword_of_swiftness'.
Item_Script_Name:
type\: item
# Must be a valid ItemTag. See 'ItemTag' for more information.
# \| All item scripts MUST h...
Script Container System
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.)
@manic crane