#(mrcrash) Item quantity in inventory script

1 messages · Page 1 of 1 (latest)

stone violet
#

Hi,
it is possible to set the quantity of an item in a inventory script?

like the img

sacred sundialBOT
#

(mrcrash) Item quantity in inventory script

#

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>

grizzled sphinx
#

!m quantity

topaz jacinthBOT
# grizzled sphinx !m quantity

Changes the number of items in this stack.

Object

ItemTag

Input

ElementTag(Number)

Tags

<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 violet
#

So i need to adjust them ? That can't be set directly inside the script ?

grizzled sphinx
#

does your item have an item script?

stone violet
#

Yes

proven crow
#

post ye script

#

you can probably use simple propertysyntax

grizzled sphinx
#

in the slots key in the inventory script, you can do [my_item[quantity=3]]

proven crow
#

but that depends on ya script

#

ye

grizzled sphinx
#

^^

stone violet
#

.haste

#

!haste

topaz jacinthBOT
stone violet
stone violet
#

delete all items

#

oh

#

the items are pickaxe

#

maybe i can't stack pick's?

grizzled sphinx
#

yeah i don't think you're able to stack pickaxes even with the mechanism

stone violet
#

okay so i need to adjust each ?

grizzled sphinx
#

oh wait, you can stack pickaxes with the quantity mechanism, i just tried it in my inventory

#

(excuse the random stuff, it's my testing world haha)

stone violet
grizzled sphinx
#

huh, that's a bit stange i was able to do it using just the [netherite_pickaxe[quantity=2]]

#

!debug

topaz jacinthBOT
# grizzled sphinx !debug
Info: debug

If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!

grizzled sphinx
#

can you send a debug please

grizzled sphinx
#
my_inventory:
    type: inventory
    inventory: chest
    gui: true
    slots:
    - [] [] [] [] [] [] [] [] []
    - [] [] [] [netherite_pickaxe[quantity=2]] [] [] [] [] []
    - [] [] [] [] [] [] [] [] []

just a test inventory

stone violet
#

yeah that's working

#

very weird

#

maybe use def make it not worky ?

#

yes

#

def ruin quantity mech

#

Okay we do specify the quantity inside the def

#

and it's work

#

Last question

I don't think it's possible but I ask you never know

Is it possible to display the small 1 at the bottom of a single item?

Just like the little 2 when you have two stacker items

I can use a resource pack if needed

thick fulcrum
#

you could use the item itself and add the "1" to the texture 😄

stone violet
#

Hmm i think the number go outside the slot quare

junior stirrup
#

Its a client-render-thing, so not possible. It could probably be done with a resource pack, a separate item model that shows a number is what I would think is a decent solution.

hearty lavaBOT
#
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.)

#

@stone violet

stone violet