- but it is not working.. It is suppose to tp one random item from the spot (xyz - my coordinates) to all players (lucky skyblock btw)
I got all the other command blocks commands working (copy chest, delte chest, kill all items) but this one (suppose to deliver the item is NOT working for some reason.. - does it have something to do with new coding or? the version i'm playing is 1.14.4 - not sure the tutorial was (maybe 1.12?) but it is suppose to work.. can anyone help me please??
teleports 1 item OR stack of items to a random player.
Setting the command block to Repeat will keep going till it has done all items one at a time so they don't all go to the same player.
If you have, say 10 diamond blocks and don't want one player to get them all you need to spread them out so they don't stack.
If you want to be sure that each player only gets one item or everybody gets the same number you probably need to use a scoreboard or something like that.
execute as @e[type=item,limit=1,distance=..10] run tp @r
limits the area from which it picks items to 10 blocks from the command block.
I don't think the "limit=1" is needed unless you want to spread the teleports out in time.
execute as @e[type=item,distance=..10] run tp @r
spreads the items (or stacks) out between players.
(In my first test 1 player got all the items but that seems to have been because they were all in one stack.)
Hello... I got this code from a tutorial i've seen...
/execute @a ~ ~ ~ tp @e[type=Item,c=1,x=24,y=8,z=12] @p
- but it is not working.. It is suppose to tp one random item from the spot (xyz - my coordinates) to all players (lucky skyblock btw)
I got all the other command blocks commands working (copy chest, delte chest, kill all items) but this one (suppose to deliver the item is NOT working for some reason.. - does it have something to do with new coding or? the version i'm playing is 1.14.4 - not sure the tutorial was (maybe 1.12?) but it is suppose to work.. can anyone help me please??
i've figured out this much now:
execute as @e[type=item] run tp @e[type=player,limit=1,x=24,y=8,z=12]
- this gives me all the items now.. - but I only want one at a time.. - and randomly.. - how do I do that??
To do randomly you would add a [sort=random] argument, which changed up the list of items to be tped, so your command would end up being
/Execute as @e[type=Item, limit=1, sort=random, x=24, y=8, z=12] run tp <to wherever you want>
/execute as @e[type=item,limit=1] run tp @r
teleports 1 item OR stack of items to a random player.
Setting the command block to Repeat will keep going till it has done all items one at a time so they don't all go to the same player.
If you have, say 10 diamond blocks and don't want one player to get them all you need to spread them out so they don't stack.
If you want to be sure that each player only gets one item or everybody gets the same number you probably need to use a scoreboard or something like that.
execute as @e[type=item,limit=1,distance=..10] run tp @r
limits the area from which it picks items to 10 blocks from the command block.
I don't think the "limit=1" is needed unless you want to spread the teleports out in time.
execute as @e[type=item,distance=..10] run tp @r
spreads the items (or stacks) out between players.
(In my first test 1 player got all the items but that seems to have been because they were all in one stack.)
Just testing.