Solved HolographicDisplaysAPI - Not Centered

Discussion in 'Spigot Plugin Development' started by Exodus54, Jan 16, 2020.

  1. Hey everyone, not sure if I'm suppose to post this here or not. I'm having some trouble with the HolographicDisplaysAPI where it's not centering on the block. (Heres a gif; https://gyazo.com/c85473283fd0fe56465861f48d590e04)

    Anyone know how to fix this? Here's my code for the actual hologram.

    Code (Java):
            location.setX(location.getBlockX());
            location.setY(location.getBlockY() + 2);
            location.setZ(location.getBlockZ());
           
            Hologram hologram = (Hologram) HologramsAPI.createHologram(Core.getInstance(), location);
           
     
  2. You need to add 0.5 to the x and z coordinates because the center of a block is #.5
     
  3. Ahhh, I had no idea. Thank you so much. Yeah it worked, you're awesome!