[SOLVED] CustomName "Hologramm" with Slimes

Discussion in 'Spigot Plugin Development' started by DevCubeHD, Jun 29, 2015.

  1. Hey Community,
    I am coding on a minigame thats like Trouble in Terrorist Town. But after some coding I had a question.

    Problem:
    That question is about collecting items in TroubleTown by right-clicking the slimes. Thats how it looks now. But when in the slime is a head, then it looks buggy.
    [​IMG]
    http://i.imgur.com/QVukzB9.png

    The Slime should be invisible and a head should be in it. Its because I want that the name is there when the player hovers over the head. If I just make the slime invisible, the name is also gone and nothing happens on hovering, exept when I am in Gamemode 3. In GM3 it works and looks like it should:
    [​IMG]
    http://i.imgur.com/3mv9zOV.png
    So is it right. But how can I do it in Gamemode 2? :(
    Setting the CustomNameVisible to false and add just the effect is not working.. any packet or something like that?
    I could use Horses. But then the Hitbox is too large. Or I take the heads as the hitbox and make the Horses invisible via NBT... Could that work? or will the Hitbox then block that I can click the skull?

    Thanks!
    ~DevCube

    PS:
    How it should look (solved with 1.8 texture head, not recommed because custom skin textures is not available anymore):
    [​IMG]

    How ot looks (without 1.8 texture) :
    [​IMG]

    Bug with 1.8 textures(not 100% right placed..., little green stribes in the iron head):
    [​IMG]
     
    #1 DevCubeHD, Jun 29, 2015
    Last edited: Jun 29, 2015
  2. Serializator

    Supporter

    You can use an invisible Armor Stand for this.
     
  3. No. Then the name is ALWAYS visible. It should only be visible when the player looks at the slime...
     
  4. Serializator

    Supporter

    I said the same thing in your other thread, you can send a PacketPlayOutSpawnEntityLiving when the player is looking at the slime, if he isn't looking anymore you can send the PacketPlayOutEntityDestroy to remove the Armor Stand. It will do exactly what you just pointed out.
     
    • Agree Agree x 2
    • Funny Funny x 1
  5. yes but then the player sees the slime ;)
     
  6. Serializator

    Supporter

    Use an Armor Stand.
     
    • Agree Agree x 1
  7. I find the slime there is smoother .. But when all people say noooo so it like that ans the asking Person feels just ignored because nobody helps him with HIS method.. :(
    so I need to do the armorstands with packets and not the slimes which had already the perfect hitbox....
    I will usw it first when you explain me how to usw the destroy packet.
    BUT PLEASE HELP ME WITH THE THING I WANTED
     
  8. Makes the slime smaller if possible.
     
  9. Serializator

    Supporter

    You could use the Slime as a hitbox and the Armor Stand to display the name-tag.
     
    #9 Serializator, Jun 30, 2015
    Last edited: Jun 30, 2015
  10. Sure, let's start throwing away CPU cycles.
     
    • Agree Agree x 1
  11. What do you mean?
     
  12. Serializator

    Supporter

    If you have a better idea I would like to hear it so @DevCubeHD can finish his minigame and I can give better advice later on.
     
  13. that is the last thing that is missing