Saving a rendered map(item) to disk permanently

Discussion in 'Plugin Development' started by bobacadodl, Mar 12, 2013.

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

    bobacadodl

    So i've recently been experimenting with the map API and I'm creating a plugin that allows you to put an image on a map by typing in the image url. I know there are a few plugins that do this already but they work by saving the map id and re-rendering the image to the map every restart. This is inefficient, ugly & causes problems. I want to save maps permanently. Sort of like how this program works: http://www.minecraftforum.net/topic/1029954-mapme-12-edit-your-map-items/
     
  2. Offline

    Rprrr

    I think you need NMS metadata for that.
     
  3. Offline

    bobacadodl

    No ... I think i'll need to use NMS NBT classes to create & save the maps. I was just wondering if it was possible to do it using the bukkit map API
     
  4. Offline

    desht

    I presume you mean the ability to directly edit the (compressed) NBT files map_X.dat in world/data/? There's no Bukkit API for this; you'd need to write the code yourself. You can avoid a dependency on NMS if you pull in a separate NBT library - http://jnbt.sourceforge.net/. You'll also need http://docs.oracle.com/javase/6/docs/api/java/util/zip/GZIPInputStream.html since the .dat files are gzip'd, and then the docs in http://www.minecraftwiki.net/wiki/Map_item_format should have all the info you need.

    But are you sure this will be easier than using the Bukkit API?
     
    bobacadodl likes this.
Thread Status:
Not open for further replies.

Share This Page