
[Suggestion] End place structure world spawn
pjc21 opened this issue ยท 1 comments
Issue when using the place structure command and spawn for pos in a world that uses WorldProviderEnd or extends it,
I am trying to place structures in an end dimension by first setting a random spawn point, then using place structure command
- worldprimer-dim-command-nth 1 11 commandtosetrandomspawn //spawn is set using sender.getEntityWorld().setSpawnPoint(pos);
- worldprimer-dim-command-nth 1 11 worldprimer place-structure {SPAWN_X} {SPAWN_Y} {SPAWN_Z} structurename
this works fine with other providers however with the end provider while the player will spawn at the new random spawn point the structure will still be created at the default spawn for
end provider as getSpawnCoordinate() will always return BlockPos(100, 50, 0).
was hoping you could add in a config option to getspawnpoint() instead of getSpawnCoordinate() from WorldUtils
maybe like
public static BlockPos getWorldSpawn(World world)
{
BlockPos spawn = null;
if(Config.getspawnpointfromEnd)
{
spawn = world.getSpawnPoint();
}
else
{
if (world instanceof WorldServer)
{
spawn = ((WorldServer) world).getSpawnCoordinate();
}
if (spawn == null)
{
spawn = world.getSpawnPoint();
}
}
return spawn;
}