Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7019

World#getSpawnLocation() returns a Location without an angle

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version 3485-Spigot-b6d12d1-2ac7fa7 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT)
    • Yes

      World#getSpawnLocation returns a Location without the spawn angle:

      @Override
      public Location getSpawnLocation() {
          BlockPosition spawn = world.getSharedSpawnPos();
          return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ());
      }
      

      As far as I can tell there's no other way to access the spawn angle.

      Should be fixed like so:

      @Override
      public Location getSpawnLocation() {
          BlockPosition spawn = world.getSharedSpawnPos();
          return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ(), world.getSharedSpawnAngle(), 0.0F);
      }
      

       

       

            Doc Doc
            offbeatwitch Henry Le Grys
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: