Maps and write

Discussion in 'Plugin Development' started by new-ewrs728, Nov 26, 2018.

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

    new-ewrs728

    Hey. I have a question. Can I change the text / add text from the plugin on the map (which is in the ItemFrame) without making a separate picture?
     
  2. Offline

    The_Spaceman

    If I understand you correctly, you want to write on a Map in a ItemFrame?

    create a custom MapRenderer, create a render method and use the mapCanvas.drawText() to add text
    (if I'm correctly)
     
  3. Offline

    Zombie_Striker

    @new-ewrs728
    You just need to create a new MapRenderer that draws text (there is already a method for drawing text for the canvas object), and then add the rendered to the map you want.

    Just note that in 1.12, you simply create a new itemstack map with the durability of the map ID to get the map. However, in 1.13, you need to get the map's MapMeta and set the map ID there.
     
  4. Offline

    new-ewrs728

    Little did not get it
     
Thread Status:
Not open for further replies.

Share This Page