Displaying graphics / text on client screen

Discussion in 'Plugin Development' started by Rio Rico Rick, May 11, 2014.

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

    Rio Rico Rick

    Hello! My first post!

    I was looking around trying to find out how to display things like graphics or text on the client screen, but every post I find says how it can't be done! Yet I have run several programs that do indeed accomplish this. Some examples are plugins that display maps on the client side screen, a plugin the displays a box containing the name of the item that the client player is looking at, and a plugin that places health bars over a mob's head while you are attacking them. This is the kind of behavior that I would like to do with my plugin. Can anyone explain perhaps how these other plugins are doing it? Thanks for any help.
     
  2. Offline

    Syd

    It's kinda hard to display anything to the client, yet Minecraft has grown in posibilities for that.

    However, you always have to (ab)use some MC mechanics/features/bugs to achieve what you want. Simply adding a new UI element is not possible.

    Ways to display stuff to a player that comes me in my mind are:
    1. Maps - you can draw anything on this 128x128 pixels (accessable via BukkitAPI)
    2. NameTags - the thing you have above your name, you can create impressive holograms with them (accessable via NMS/Plugins)
    3. Particles - you can also write with particles (don't know if accessable via Bukkit, but at least NMS)
    4. Chat - old, lame but it does it's job in providing information, and it has even some input capabilities (accessable via Bukkit and partly NMS I think)
    5. All kind of vanilla HUD elements, like XP bar or the boss health bar (Bukkit and NMS)
    6. Signs - well, signs. ;)
     
  3. Offline

    Rio Rico Rick

    I thank you so much for your reply!!!! That was great. the first thing I am going to do is investigate how to access that 128*128 map display! Wow thanks again. :D
     
  4. Offline

    thecrystalflame

  5. Offline

    Rio Rico Rick

    Thanks again for the reply. I now realize that "map" here mean the map item that is help in the player's hand when selected. What I was trying to do is draw a map like the ones you see in the upper right hand corner of the screen with a plugin like Rei's Mini-Map. Like this:
    MiniMap.png Thanks again!
     
  6. Offline

    themuteoneS

    No it can't be done at the moment because the client is what controls something like an overlay. The server can only manipulate items, the world and the player and not much else. Rei's minimap is a mod that actually modifies the minecraft client source and since you can't do that over the network something like that would not be possible.

    EDIT: see italics
     
  7. Offline

    Rio Rico Rick

    Ah ha! That was the source of my confusion. To do a real map, I would have to decompile the MineCraft source and add it in! OK that clears a lot up. Thanks!
     
  8. Offline

    themuteoneS

    Not exactly. You would have to get your users to install a mod which most don't know how or are too lazy. Changing the server source won't get you too far because of the same reasons as before. The server has limited control over what can be done.
     
  9. Offline

    Rio Rico Rick

    Ah yes! That is in fact true! Thanks!
     
  10. Offline

    Garris0n

    You're very enthusiastic with your exclamation points :p
     
    Dai_Kunai, themuteoneS and Azubuso like this.
  11. Offline

    Rio Rico Rick

    Yes, you're right (!!!!) I probably picked up that habit from doing very bad web design in the mid 1990's. Too bad there are no blinking marquees to use here. <---- period - good maybe I can break the habit. We did business websites, and one of my employees insisted on having every word in BOLD and exclamations marks after every sentence. Used to drive me nuts. Cool, Laterz.
     
    Garris0n likes this.
Thread Status:
Not open for further replies.

Share This Page