#Randomized Loot

1 messages · Page 1 of 1 (latest)

low jacinth
#

Hello folks, Me and my Buddies have been struggling making randomized loot, So, ive come here,

Basically the problem: We want to clone a barrel from under a armorstand, to a specific spot (in this case, lets say 5 blocks under the commandblock),
We have been trying, and the best result we have gotten was random armorstands being chosen, but spawning ABOVE them (we were testing at the time)

Itd be lovely for some help folks, :]

cyan coyote
#

choosing a random armor stand and getting the barrel below it is one of the greater systems there is, the other option would be to randomise a scoreboard value and depending on the value copy a barrel from a hardcoded position to another position

low jacinth
#

in the thing my friend is making, therefore its viable

cyan coyote
low jacinth
#

no i mean in the map my friends making, he made armorstands uncraftable

cyan coyote
#

isnt that good tho? then players cant cheat with them

low jacinth
#

lol

low jacinth
#

im tryin to rack mah brain around it rn

cyan coyote
#

oh i thought that was a finished version xd

#

well first of all give the armor stands a name, such as "randomloot1", so you can specify which armor stands can be randomly selected

#

and then the rest should work if every armor stand has a barrel below them

low jacinth
#

but the problem is the loot isnt going to the specific spot,

#

ie: under commandblock

cyan coyote
#

oh? is it not going to 50 -60 3?

low jacinth
#

yeah,

#

it isnt,

cyan coyote
#

and the command is not spitting out an error right? in the "last output" box

cyan coyote
#

hm well if theres a barrel below every armor stand it should work

#

works well for me too

#

also is it supposed to be -60y? maybe the place where its trying to copy to isnt loaded

low jacinth
#

could you theoretically rewrite it

cyan coyote
#

i mean if you replace "50 -60 3" with "~~2~" it worked wonderfully for me

#

it would choose a random armor stand and take whats below it and clone it on its head

#

you can test that to see if it would work

low jacinth
cyan coyote
#

yeah i was just saying you could do that as a test to see if it works for you

#

or you know if you are near the command block and the armor stands are far away they might not be loaded

#

that could be one of the errors too

flint moth
#

Didn’t realise ur already got an answer - my fault if this is redundant yhidehomer

golden stone
#

/execute at @p [name="random"] run /setblock ~-1 ~ ~ redstone

sleek ravine
#

With commands one of the best ways is using armor stands, but if you want to use addons just use a barrel with a random loot table inside it.
fill_container
The contents of the barrel are decided randomly the moment it is opened

An article showcasing the available functions for Loot and Trade Tables