Generator getFixedSpawnLocation not working

Discussion in 'Plugin Development' started by ZachBora, Jul 29, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ZachBora

    I've put this in my class inheriting ChunkGenerator :
    Code:
    public Location getFixedSpawnLocation(World world, Random random) {
      return new Location(world, 8, 65, 8);
    }
    
    but I'm always spawning about plus or minus 10 of that location... and at Y = 257 because my world is covered, just like the nether. I noticed if I change the x and z it does make a difference but never constant.

    The location set in my generator is an empty space, can't suffocate the place (I even went there to verify). Adding 1 to the y doesn't make a difference either.
     
  2. Offline

    fireblast709

    ZachBora what triggers the teleport? Is it the first join?
     
  3. Offline

    ZachBora

    There is no teleport per se, the player joins at that position (even says so in console).
     
  4. Offline

    fireblast709

  5. Offline

    ZachBora

    fireblast709 If you mean world environment, it's normal. Is there a way to make the worldgenerator change that?
    I guess if I can force it to think it's Nether it would work.

    When people die they do go to the spawn I've set. Just not on first login. This is the only plugin running.
     
  6. Offline

    fireblast709

    ZachBora no the normal world should work fine
     
  7. Offline

    ZachBora

    But it doesn't work on player first login :(
    I don't want to be forced to teleport the player, other plugins should handle that if needed, I wouldn't even know how to detect if it's their first login.
     
  8. Offline

    fireblast709

    ZachBora not sure if it would work, but prelogin and checking hasPlayedBefore() might do
     
  9. Offline

    ZachBora

    fireblast709 I might have to do that, but I'll make it lowest priority.
     
Thread Status:
Not open for further replies.

Share This Page