#check if an item can exist as a dropped item

1 messages · Page 1 of 1 (latest)

oak kindle
#

Using "all items" not all items from there may exist as a dropped item

runic chasm
#

what?

#

wdym "can exist as a dropped item"?

#

if you press q, any item can be dropped

winged elm
#

!drop all items at me
!set {Dropped::*} to all dropped items

oak kindle
# runic chasm what?

For example, a bamboo sprout can get out of "all items", which is not able to exist as a dropped item

winged elm
# runic chasm what?

he's talking about items that have placed variants example "Wall banners" only standing banners can be held

runic chasm
#

aah okay

runic chasm
winged elm
oak kindle
runic chasm
#

are items alive?

#

try while exists

oak kindle
#

Same thing, doesn't work

winged elm
#

Huh

#

no

#

drop all the items and add them to a variable

#

so you can save the items

#

no

#

what the flipp

oak kindle
#
on drop:
    wait 1 tick
    while event-dropped item exists: 
        set {_j::*} to all dropped items
        set event-dropped item to random element of {_j::*}
        wait 5 tick
runic chasm
#

no

#

thats gonna set {_j::*} to all dropped items that are currently loaded in your world

#

(actual entities that are already on the ground at that instant)

runic chasm
winged elm
#
command /d:
  trigger:
    drop all items at player
    set slot (integers between 0 and 40) of player's inventory to 64 stone
    set {Items::*} to all dropped items in radius 5 around player
    wait 1 second
    kill all dropped items in radius 5 around player
oak kindle
oak kindle
#

You really are brilliant

#

thanks!