BlueCommander
  • 𝐇𝐨𝐦𝐞
  • 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐚𝐧𝐝 𝐃𝐚𝐭𝐚 𝐏𝐚𝐜𝐤𝐬
    • 𝐌𝐚𝐢𝐧 𝐒𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧 1 >
      • Chest Transportation
      • Damage Icons
      • Bonsai Pots
      • Christmas Animals
      • Blood Magic
      • Be a Villager
      • Vein Miner
      • Tree Capitator
      • Guns
      • More TNT
      • More Enchantments
      • Player Head Tricks
      • Christmas Food
      • Entity Cloning
      • Army Builder
      • Be a Magma Cube
    • 𝐌𝐚𝐢𝐧 𝐒𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧 2 >
      • World Loader
      • Gravity on any block
      • Drinks
      • Outside World
      • Halloween Weapons
      • Health Tags
      • Mazes
      • MC Improvements
      • Temmie Boss
      • More Plants
      • More Swords
      • Bedwars Items
      • Laser Beams
      • Jade Ore
      • Paintball Gun
      • Halloween Survival
    • 𝐁𝐥𝐢𝐧𝐠𝐄𝐝𝐢𝐭 𝐏𝐥𝐮𝐠𝐢𝐧𝐬 >
      • Top Soil
      • Forester
      • Water Flood
      • Patterns
      • Region Info
      • BlingEdit Commands
    • 𝐍𝐨𝐭 𝐎𝐧 𝐘𝐨𝐮𝐭𝐮𝐛𝐞 >
      • Crates
      • More Structures
      • Advanced UHC
      • Deco Sandwitches
      • Be Herobrine
      • Morphing >
        • Creeper Addon
      • Flamethrower
      • Arrow Effects
      • Block Pets
      • BlueFun
      • Seismic Axe
  • 𝐑𝐞𝐬𝐨𝐮𝐫𝐜𝐞𝐬
    • Introduction to Resources
    • ​
    • 𝐁𝐞𝐠𝐢𝐧𝐧𝐞𝐫𝐬
    • Command Block Basics >
      • Introduction
      • How Commands Work
      • Conditional Commands
      • Coordinates
      • Selectors
      • Tab Completion
      • Data Tags
    • Command Usages >
      • Introduction
      • /tell
      • /kill
      • /tp
      • /teleport
      • /replaceitem
      • /summon
      • /effect
      • /data
      • /setblock
      • /give
      • /particle
      • /playsound
      • /execute
      • /clone
      • /fill
      • /tag
      • /team
      • /scoreboard
    • ​
    • 𝐁𝐚𝐬𝐢𝐜
    • Command Creations >
      • Introduction
      • Arrow Particles
      • Lock Chests
      • Grappling Hook
      • Blocks/Items On Head
      • Custom Pets
      • Custom Portals
      • Lava + Water Swapped
    • ​
    • 𝐀𝐝𝐯𝐚𝐧𝐜𝐞𝐝
    • Command Creations >
      • Introduction
      • Chairs
      • Randomly Spawning Structures
      • RPG Villagers
      • Block Durability
      • Pathfinding AI
  • 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐨𝐫𝐬
    • Hypixel Skyblock
    • Kits Maker
    • Custom Blocks Generator
    • Floor Crafting Generator
    • Minecraft Heads
  • Hypixel Skyblock Remake
  • 𝐎𝐭𝐡𝐞𝐫 𝐌𝐚𝐩𝐬
    • Don't Dig Straight Down
    • Levitation Parkour
    • 1v1 Pvp
  • 𝐂𝐨𝐦𝐦𝐢𝐬𝐬𝐢𝐨𝐧𝐬
Previous
For 1.13-1.16 Minecraft Java Edition

Randomly Spawning Structures

In this tutorial, I will be showing you the basics to spawning structures randomly. For spawning things randomly every method is quite advanced but this is the simplest one. If you are here for the commands rather than learning they are all at the bottom of the page.

The commands I will be using to achieve this are:

• Scoreboard
• Clone
• Execute
• Tp
• Tag

Method / Explanation:
Firstly we need a structure to have in our world. I am going to quickly make a random structure.
Picture
Then we need to decide how we are going to have our structure spawning, I am going to use a system which involves checking for how many of a certain mob are in the world as I think this is the easiest method.

To do this method, we will first need to create a scoreboard objective. If you do not know much about the /scoreboard command a tutorial can be found here.
Picture


/scoreboard objectives add MobCheck dummy



Now we are set up we can start working on the commands that go in a repeating clock. We need to choose an animal to test and how many we are searching for. This system will increase a score by one for every mob you specified that spawns and then when the score reaches a number of your choose, it will spawn a structure at one of the mobs randomly.

I want my structure to spawn on the surface level and be quite common so I am going to have my mob as a cow and it will search for 15 before spawning the structure.
/scoreboard players set @a MobCheck 0
/execute as @e[type=cow,tag=!Checked] run scoreboard players add @p MobCheck 1

We reset the MobCheck score every tick so the score doesn't stack and it is correct for that tick alone. Also we are testing for cows without a tag because after we reach 15 we will tag them all in order to prevent the score just staying at 15 constantly.

Our next command will check for a player with a score of 15 and if it finds one, it will tag a random cow with the tag structure:
/execute as @a if score @s MobCheck matches 15.. run tag @e[type=cow,tag=!Checked,limit=1,sort=random] add Structure

And after that we will add a conditional command that has
/tag @e[type=cow] add Checked
So that it tags the old cows with the tag.

Now we have the system all set up! However it will not spawn our structure...

To do this we need to execute from the 'Structure' tagged cow and clone the build we made to the same place the cow is. To do this we just do a clone like normal but the destination will just be relative coordinates:
/execute at @e[tag=Structure,type=cow] run clone <x1> <y1> <z1> <x2> <y2> <z2> ~ ~ ~
Picture
Picture
Picture
Picture
Pictures above were for the 1.12 page so ignore the different execute format and the 'c=1' as in 1.13 it was replaced to 'limit=1' but you get the idea!

Then finally we need to kill the 'Structure' tagged cow (or whatever your mob is) in order to prevent it constantly cloning the structure to its location.
/tp @e[tag=Structure] ~ ~-999 ~
We use the tp command to make it not have death animation or mob drops.

I hope you learned something! ~Blue :)
Your commands should look like this:
Picture


/tp @e[tag=Structure] ~ ~-999 ~
Picture


/execute at @e[tag=Structure,type=cow] run clone <x1> <y1> <z1> <x2> <y2> <z2> ~ ~ ~
Picture


/tag @e[type=cow] add Checked
Picture

/execute as @a if score @s MobCheck matches 15.. run tag @e[type=cow,tag=!Checked,limit=1,sort=random] add Structure
Picture


/execute as @e[type=cow,tag=!Checked] run scoreboard players add @p MobCheck 1
Picture


/scoreboard players set @a MobCheck 0


Next
Powered by Create your own unique website with customizable templates.
  • 𝐇𝐨𝐦𝐞
  • 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐚𝐧𝐝 𝐃𝐚𝐭𝐚 𝐏𝐚𝐜𝐤𝐬
    • 𝐌𝐚𝐢𝐧 𝐒𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧 1 >
      • Chest Transportation
      • Damage Icons
      • Bonsai Pots
      • Christmas Animals
      • Blood Magic
      • Be a Villager
      • Vein Miner
      • Tree Capitator
      • Guns
      • More TNT
      • More Enchantments
      • Player Head Tricks
      • Christmas Food
      • Entity Cloning
      • Army Builder
      • Be a Magma Cube
    • 𝐌𝐚𝐢𝐧 𝐒𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧 2 >
      • World Loader
      • Gravity on any block
      • Drinks
      • Outside World
      • Halloween Weapons
      • Health Tags
      • Mazes
      • MC Improvements
      • Temmie Boss
      • More Plants
      • More Swords
      • Bedwars Items
      • Laser Beams
      • Jade Ore
      • Paintball Gun
      • Halloween Survival
    • 𝐁𝐥𝐢𝐧𝐠𝐄𝐝𝐢𝐭 𝐏𝐥𝐮𝐠𝐢𝐧𝐬 >
      • Top Soil
      • Forester
      • Water Flood
      • Patterns
      • Region Info
      • BlingEdit Commands
    • 𝐍𝐨𝐭 𝐎𝐧 𝐘𝐨𝐮𝐭𝐮𝐛𝐞 >
      • Crates
      • More Structures
      • Advanced UHC
      • Deco Sandwitches
      • Be Herobrine
      • Morphing >
        • Creeper Addon
      • Flamethrower
      • Arrow Effects
      • Block Pets
      • BlueFun
      • Seismic Axe
  • 𝐑𝐞𝐬𝐨𝐮𝐫𝐜𝐞𝐬
    • Introduction to Resources
    • ​
    • 𝐁𝐞𝐠𝐢𝐧𝐧𝐞𝐫𝐬
    • Command Block Basics >
      • Introduction
      • How Commands Work
      • Conditional Commands
      • Coordinates
      • Selectors
      • Tab Completion
      • Data Tags
    • Command Usages >
      • Introduction
      • /tell
      • /kill
      • /tp
      • /teleport
      • /replaceitem
      • /summon
      • /effect
      • /data
      • /setblock
      • /give
      • /particle
      • /playsound
      • /execute
      • /clone
      • /fill
      • /tag
      • /team
      • /scoreboard
    • ​
    • 𝐁𝐚𝐬𝐢𝐜
    • Command Creations >
      • Introduction
      • Arrow Particles
      • Lock Chests
      • Grappling Hook
      • Blocks/Items On Head
      • Custom Pets
      • Custom Portals
      • Lava + Water Swapped
    • ​
    • 𝐀𝐝𝐯𝐚𝐧𝐜𝐞𝐝
    • Command Creations >
      • Introduction
      • Chairs
      • Randomly Spawning Structures
      • RPG Villagers
      • Block Durability
      • Pathfinding AI
  • 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐨𝐫𝐬
    • Hypixel Skyblock
    • Kits Maker
    • Custom Blocks Generator
    • Floor Crafting Generator
    • Minecraft Heads
  • Hypixel Skyblock Remake
  • 𝐎𝐭𝐡𝐞𝐫 𝐌𝐚𝐩𝐬
    • Don't Dig Straight Down
    • Levitation Parkour
    • 1v1 Pvp
  • 𝐂𝐨𝐦𝐦𝐢𝐬𝐬𝐢𝐨𝐧𝐬