1

Commands for randomly filling shulker boxes in a range of cords!

JBurd83's Avatar JBurd836/17/18 7:25 pm
1 emeralds 759 6
6/18/2018 6:09 pm
JBurd83's Avatar JBurd83
I'm working on a mini game map and needing to fill one item in random shulker boxes in a set cords (within the building). I will also need a way to reset them and clear them out as well. Would love to know the commands to do these things. Thank you.
Posted by JBurd83's Avatar
JBurd83
Level 55 : Grandmaster Architect
62

Create an account or sign in to comment.

6

1
06/18/2018 6:09 pm
Level 55 : Grandmaster Architect
JBurd83
JBurd83's Avatar
Thank you everyone, I will try what garlicbreathinator suggest.
1
06/18/2018 9:53 am
Level 31 : Artisan Engineer
garlicbreathinator
garlicbreathinator's Avatar
One thing you could do would be to put a placeholder (armor stand with the "Marker" data tag) inside the block of each shulker box. As an example, I'll say that all of these armor stands also have the scorboard tag "ShulkerLocation".

To empty all of the shulkers, you would run the command:
1.12: /execute @e[type=armor_stand,tag=ShulkerLocation] ~ ~ ~ blockdata ~ ~ ~ {Items:[]}
1.13: /execute as @e[type=armor_stand,tag=ShulkerLocation at @s run /data block ~ ~ ~ {Items:[]}

To put a repeater in the center of a random shulker:
1.12: /execute @r[type=armor_stand,tag=ShulkerLocation] ~ ~ ~ replaceitem block ~ ~ ~ slot.container.13 minecraft:repeater
1.13: /execute as @r[type=armor_stand,tag=ShulkerLocation] at @s run replaceitem block ~ ~ ~ slot.container.13 minecraft:repeater

I hope this is what you are looking for. If it is not, please give me more details so I can find what you need. Thanks!



Good luck,

Garlicbreathinator
1
06/18/2018 8:07 am
Level 57 : Grandmaster Engineer
ShelLuser
ShelLuser's Avatar
It's probably a better idea to use chests, because then you can apply loot tables to them to randomly fill up their inventory. For example:

/blockdata x y z {Loottable:"minecraft:chests/abandoned_mineshaft"}

Unfortunately shulker boxes have different behaviors and they don't respond to this. 1.12 also doesn't really allow you to retrieve block data in a usable way such as 1.13 does (through the /data command) so you're somewhat stuck there.

As such my suggestion would be to use regular chests, apply loot tables and then insert the shulker box into your storyline in a different way.
2
06/17/2018 8:15 pmhistory
Level 46 : Master Architect
Isz
Isz's Avatar
I can help but need to clarify what you actually mean. You have a bunch of Shulker boxes around the map and you want to put an item in a random one of those boxes? Then reset it?
1
06/17/2018 8:27 pm
Level 55 : Grandmaster Architect
JBurd83
JBurd83's Avatar
To sum up what I need done, I built a soul snacher two map, I need redstone repeater to be placed randomly in shulker boxes in 8 floors of an office building. If it matters, all shulker boxes is either white or light gray. Once the round is over, I need away to clear all shulker boxes so an all new set of shulkers will have repeaters in them. the cords for the building is: 96 1 -20 to -27 69 -97. I can provide any other info if I miss anything. Thank you.
1
06/18/2018 4:42 am
Level 46 : Master Architect
Isz
Isz's Avatar
Are the shulker boxes always in the same place every round? Just one repeater is in a random box?

You need a randomiser that's triggered by the round starting, that would summon a shulker box with a repeater in. To reset it you'd just summon all fresh shulker boxes triggered by the round ending I guess
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome