Description
This mod allows map makers / server owners to change the respawn point & dimension of dimensions.
To use this mod you place a file called perfectspawn.json in the main minecraft / server directory or (in a singleplayer environment) in the main directory of a save. The file has to have this basic structure:
In the general section there is currently only one property you can set which is "initialSpawnDimension". This sets the dimension where a player who has never logged in before spawns initially.
This config would cause players to initially spawn in the nether when first joining the game.
The rules array can contain multiple rules which control the settings for different dimensions.
Each rule has these properties:
- appliesTo: An array containing either dimension ids / names of dimensions types / full class names of world providers. This controls what dimensions this rule is applied to. "*" can be used as a special element of appliesTo which will apply this rule to all dimensions.
- canRespawnHere: Whether players can respawn in the dimensions this rule applies to.
- canSleepHere: Whether players can sleep in the dimensions this rule applies to. (If canRespawnHere is set to false this has no effect). This also allows sleeping in dimensions where you generally can't sleep (Like the Nether / End).
- spawnPoint: The position at which players will spawn in this dimension.
- respawnDimension: The dimension players will respawn in when dying in this dimension (If canRespawnHere is set to false)
Rules that come later in the rules array override values of rules that come earlier.
Here are some examples:
This changes the initial spawn dimension & the respawn dimension of all dimensions to the nether. It also moves the spawn point of the nether to "x: 5, y: 84, z: 10" and allows players to change their spawn point in the nether by sleeping.
With this players will initially spawn in the end at "x: 23, y: 40, z: 10". Once they die they will respawn in the overworld at "x: 9, y: 100, z: 0". When they die there they will respawn in the nether at "x: 500, y: 40, z: -500". Dying in the nether will just respawn them back at "x: 500, y: 40, z: -500". It isn't possible to sleep in the nether / end / overworld.
Issues
Please post about bugs on the github issue tracker and not on the curseforge post. Also make sure your json is valid before creating a bug report.
Info for older versions ( < 1.12.2):
This mod allows map makers / server owners to set the exact spawn point of a world. You can also specify the start dimension.
To use this mod you place a file called PerfectSpawn.json in the main minecraft / server directory or (in a singleplayer environment) in the main directory of a save. The file has to have the following format:
{
"spawnDimension": 1,
"spawnX": 50,
"spawnY": 70,
"spawnZ": 60,
"exactSpawn": true,
"forceBed": true,
"spawnProtection": true
}
This config file sets the spawn point to X:50,Y:70,Z:60 in the end, enables beds, spawn protection and forces an exact spawn.
If you create a file you always have to specify spawnX,spawnY,spawnZ and spawnDimension. exactSpawn, spawnProtection and forceBed are optional and default to true.
- "exactSpawn" : Specifys whether players will respawn exactly at the specified spawn point.
- "forceBed": Specifys whether PerfectSpawn should force beds to be possible in the spawnDimension
- "spawnProtection" : Allows Spawn Protection in changed spawn dimensions.
A PerfectSpawn.json in a world directory overrides the one in the main dictionary.
You can use the command "/ps reload" to reload all config files and apply them instantly.
This mod class transforms all WorldProviders it finds, if you get a crash that only happens while using PerfectSpawn come to me first!
Instead of creating the json files manually you can also use the /ps set command to change the spawn ingame.
If you wanna add Perfect Spawn to a modpack / ship it with a map feel free to do so.
hes saying one of the old bugs that has been around since forever in minecraft, where innitial login to spawn uses exact Y, while respawn after death uses 'safe Y', not sure if your mod can correct that easily, or might be a better fix for forge
Is that an issue though? You generally don't want players spawning in blocks right?
There is a bug in the Y level spawn determination. If you have exact spawn set true, then your first spawn into a world is at the Y level specified -- even if someone has built at that location. Respawning after death is on the surface/top of what was built.
I just noticed: you say "server dictionary", or "world dictionary". I think you mean "directory".
Easy.
1. I look for things in the config directory, not the main directory.
2. Sure, if I remember to come here and check, I can see the file template. But I start by assembling the mods that I want to use, run the server, and stop it; then, tweak config files, toss out the old world, and restart. Check how it works/looks. Repeat. Lack of a config file to play with made me first wonder if I had the mod installed right, and then a search to find the docs page here.
1. Since the PerfectSpawn.json file configures a vanilla mechanic i felt like it was better located in the main dictionary.
2. But why? :P If you use this mod you generally wanna set the spawn to a specific location you have in your head. You can just copy the example config file of the post can't you?
Why does it look in the main server directory, rather than in the config directory?
Also, how about saving a config file for the default spawn that we can then edit?
With "main server dictionary" i mean the place where the server jar is located, if it crashes please post the report to the issue tracker :)
Sorry for the stupid question, but what do you mean by the "main server dictionary", or the dictionary of the save? What folder exactly do I put it in for my server?
I tried placing the json file in the surface of the world file on SSP, and it crashed when I opened the world (yes I had the mod file in the mods folder as well). I'm guessing I just put the json in the wrong place, so where exactly should I put it?
Also, is this mod required on the client end, if it's installed the on the server?I want to have a precise spawn location for my server, but don't really care if each and every player has this mod installed. Will it work if it's only installed on the server? Or will they be disallowed entry, or have the spawn not work for them?
Thanks! This looks to be exactly what I needed!
marmarultimate use jadedspwan form the Agrarian Skies: Hardcore Quest pack on ftb launcher, has almost the exact same functions (it's missing the force bed config) but for 1.6.4, just copy jadedspawn-1.0.jar from the mods folder & jadedspawn.cfg from the config folder, besure to edit the config for your map
In reply to wooby_6:
You are a lifesaver, definitely going to try this
Disable Force Bed.
dude, this mod is causing beds to explode in the overworld, might wanna check that out
Maybe I am doing something wrong, but I am also having problems with beds exploding in the overworld. I have forceBed set to false and beds still explode in the overworld whenever you try to use them. I can tell PerfectSpawn is working because a new character will spawn in the dimension I specify and they can use the bed there or even in other overworld like dimensions, but they cannot use a bed in the overworld no matter what I change the value of forcebed to. I am using MultiWorld to create additional replicas of the overworld with some variations on worldgen.
Do you also have that problem without Multiworld?
No it changes the vanilla spawn point.
This is a amazing mod! Could you back port it to 1.6.4, im working on a pack my self and would be GREAT use!
If I want to alter the initial spawn, only, can this mod do that?
Specifically: Can your initial spawn be in a mystcraft age, instead of the overworld, yet still have the normal "die in another age/twilight forest/overworld, respawn in that age/forest/overworld" instead of respawning at the initial spawn age?