forum Forumsplay_arrow Minecraft fiber_manual_record Redstone

1

I made spawnable shelters with 1.8 features.

1 emerald12 replies327 views
created 07/02/2014 12:51 pm by usa
last reply 07/02/2014 6:12 pm
I have made houses that can be easily placed and have an interesting limitation: they cannot be placed too close to other spawned-in houses. In other words, if you spawn in one house, you cannot place another house too close to it.

Here's a video:



Here's my commands and a explanations for a few of the harder ones:

detect the boat:
/testfor @e[type=Boat]

see if the boat is too close to something else:
/testfor @e[type=Boat,score_nearBuilding_min=1]

IF BOAT IS TOO CLOSE TO A BUILDING:

give the player a new boat:
/execute @e[type=Boat,score_nearBuilding_min=1] ~ ~ ~ /give @p boat 1 0 {display:{Name:"Shelter Blueprint",Lore:["Place a small shelter"]}}

tell the player he's too close to a building:
/execute @e[type=Boat,score_nearBuilding_min=1] ~ ~ ~ /title @p title {text:"Error",color:red,italic:true,bold:true}
/execute @e[type=Boat,score_nearBuilding_min=1] ~ ~ ~ /title @p subtitle {text:"Too close to a building!",color:red,italic:true,bold:true}

kill the boat:
/kill @e[type=Boat]

IF THE BOAT IS *NOT* TOO CLOSE TO A BUILDING:

for this part, to make the houses seem random, I used a mine cart on a circular rail. I used detector rails to power the command blocks, and powered rails to move the mine cart. When a house needed to be spawned at a boat, I would set redstone blocks next to all powered rails and quickly remove them, making the mine cart go to the next powered rail and stop until it was needed again. Here's the command I used to do that:

place redstone block(s)
/setblock <x y z next to powered rail> redstone_block

break the redstone block(s)
/setblock <x y z of redstone block> air

At this point the mine cart would move, thus triggering three commands:

clone the pre-built version of the house and the command blocks underneath w/o copying the air:
/execute @e[type=Boat] ~ ~ ~ /clone <x1 y1 z1 x2 y2 z2 of pre-built shelter> ~ ~-4 ~ masked
(The "masked" word at the end makes it so it does not copy any unwanted air- very important!)

The reason for the y placement coordinate being ~-4 is because 4 blocks under the house, I had a clock running a command, but I'll get to that in a minute.

(You can't see this in the video) play a pop sound for the nearest player:
/execute @e[type=Boat] ~ ~ ~ /playsound random.pop @p ~ ~ ~

kill the boat:
/kill @e[type=Boat]

Okay, so there's all the commands used for copying the house correctly (or not copying it, for that matter). But how did I make it so you cannot place 2 houses too close to eachother? Well, as I said earlier, I have a clock and command block 4 blocks under the house running a command (therefor the house is cloned 4 blocks under the boat, starting from the lowest point). For the clock I used a comparator clock using a redstone torch since I can lead a signal into the clock while it is at spawn, effectively turning it off. The reason it is not turned off when it is cloned is because the source of the signal turning it off is outside of the the cloned region.

Anyway, here's that command:

prevent players from spawning houses near your house:
/scoreboard players set @e[type=Boat,r=30] nearBuilding 1

That command goes along with this one I used in the beginning:
/testfor @e[type=Boat,score_nearBuilding_min=1]

And lastly, here's a picture of my setup. I hope you enjoyed and maybe learned something, and I hope my directions were not too hard to follow. Have a nice day!

picture of my setup:
http://imgur.com/bwMYlsn
Posted by avatar
usa
Level 39 : Artisan Cowboy
108

comment Login or register to post a reply.

12 replies

07/02/2014 4:58 pm
Level 26 : Expert Artist
Ashfur4ever
go work for Moshang. now. no, stop talking, go. no just-just go
07/02/2014 6:12 pm
Level 26 : Expert Network
Zylerius
Mojang*
07/02/2014 5:59 pm
Level 39 : Artisan Cowboy
usa
But I don't know how to write java all I know is little baby Minecraft commands! ;-;
07/02/2014 6:09 pm
Level 26 : Expert Artist
Ashfur4ever
no. stop. talking. go. now.
07/02/2014 4:48 pm
Level 2 : Apprentice Miner
BumsRealm
DAYUM, YOU SMART
07/02/2014 5:55 pm
Level 39 : Artisan Cowboy
usa
Lol, thanks.
I guess.
Suspicion of sarcasm.
#notLettingGuardDown #mustNotOpenHeart
07/02/2014 4:11 pm
Level 1 : New Narwhal
DOMOHEADmc
This is a very nice way of showing what you can do in 1.8. I'm making a machine that lets you tame and breed rabbits in the 14w27b snapshot, even though they will probably add this in the C snapshot, it will be fun to make.
http://www.planetminecraft.com/project/the-bunny-project/
07/02/2014 4:09 pm
Level 70 : Legendary Pixel Painter
EntG1
House doesn't look great, tbh, but the concept is really cool!
07/02/2014 4:43 pm
Level 39 : Artisan Cowboy
usa
Thanks a ton! And the houses aren't exactly supposed to be the spawnable equivalent of country style villas. XD They are supposed to look home made, really thrown together and kinda make-shift.

It makes sense in the context I'm using this in.
07/02/2014 4:05 pm
Level 39 : Artisan Cowboy
usa
Bump, I kinda want some feedback
07/02/2014 1:32 pm
Level 44 : Master Pokemon
OwhForFuckSake
You should get featured on minecraftforum.net
Really amazing work!
07/02/2014 1:47 pm
Level 39 : Artisan Cowboy
usa
Thank you very much! I will post it to Minecraft Forums now! (I much prefer planet Minecraft though XD)

On a side note, this is for my rust map, which you can see on my profile!

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome