Minecraft Blogs / Tutorial

Problems With Spawning In Maps?Minecraft Spawnpoint Fix!

  • 857 views, 0 today
  • 2
  • 1
Mr0-Redmen
Level 34 : Artisan System
4
What if you are making a map and players don't spawn in the wanted area or on one wanted block?
Then you build this! :D
This will basicly teleport and spawnpoint players to a specific block when they join the game!
1.Platform
Make a 33x33 block platform.It can be out of any block!
2.Main Block
From that platform get the center block witch should be 17 block from the corners!Now take its coordinates!(Players will spawn on that center block!)
Make sure you stand on the block and type
/setworldspawn
!!!
3.New Team
Create a new scoreboard team using:
/scoreboard teams add <team name>
I use spawn as the team name!
Make sure that after making the team you type the command:
/scoreboard teams join spawn
4.Command Blocks and Hoppers
Put a command block exactly under the center block and set the command to:
/testfor @p[team=!spawn,r=32]
team=!spawn instead of spawn you write the name of the team!
Then make a hopper clock(2 hoppers going into each other and a comperator going from the hopper into the command block)!
5.Comperators!
Then put a comperator going out of the command block and into a reapeater!Connect the redstone signal from the repeater into 2 command blocks!The first command block will have the command:
/tp @a[team=!spawn,r=34] <coordinates of the central block>
And the second one:
/spawnpoint @a[team=!spawn,r=35] <coordinates of the central block>
6.Joining the team!
Put a repeater with a 3 tick delay and is being powered by the same redstone signal as the two command blocks!The repeater powers a command block with the command:
/scoreboard teams join @a[team=!spawn,r=37]
7.Test!
Finaly to test it you stand on the platform and type the command:
/scoreboard teams leave spawn
and if you were teleported to the central block it works!
If not then you can read the explanation down below or leave a comment if the explanation didn't help you!
I will try to help you as much as posible so if you have a problem leave a
comment!

Explanation:
Step 1
Players can spawn on a about 32x32 area!(4 chunks, 1 chunk = 16x16 blocks!)
32x32 doesn't have a center block but 33x33 does!
Step 2
Since players can spawn on a 32x32 area if we set the world spawn( /setworldspawn ) on the central block they will spawn on the platform!
This is very important cause the command blocks will only tp players if the are on the platform!
Step 3
I know many of you would have used a scoreboard objective for this but you are rong!!!
When players login for the first time there scoreboard objectives scores are set to a very low negative value(like -10006431)!
This is why we use teams!Cause when a player logs in the player isn't in any teams and we look for players in no teams in a radius of 34 blocks from the command blocks!
/scorboard teams join spawn
Is just so while building this you don't activate any command blocks!
Step 4
This will keep looking for a player that is in 32 blocks radius of that command block and that is not in team spawn("spawn" is the team name)!
If you don't know how to build a hopper clock there are many explanations on google or youtube!
Step 5
Comparators activate when the command block has succesfully done the command(in this case found the player)!So this is a way to know if there is a player that is not in team spawn and is in the spawn area!
If there is we basicly teleport him to the central block and set his spawnpoint to the central block!
Step 6
We basicly add the players to the spawn team!
Step 7
When we leave the team and are on the platform the command block finds us and activates the other command blocks!!!
If this didn't help you comment below your problem and i will try to help you!!!
The image shows the design!!!
~Mr0
CreditThanks Dragnoz For Making the First Version Witch Inspired Me!! https://www.youtube.com/user/dragnoz
Tags

Create an account or sign in to comment.

Welcome