MapImage using the new colors

Discussion in 'Resources' started by ECB2, Feb 9, 2014.

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

    ECB2

    Haven't seen anyone post this yet, so here it goes.
    Some stuff from the ColorUtil class was grabbed from the Minecraftwiki, so credits to them.

    Put the 2 provided classes into your project and it should work just fine.

    ColorUtil: ColorUtil.java
    MapImage: MapImage.java

    To use this, call ColorUtil.init(); in your onEnable block, before you start using the MapImages.

    Code Examples:

    Code:java
    1. public void render(MapView view, MapCanvas canvas, Player player) {
    2. BufferedImage image = ...;
    3. MapImage map = new MapImage(image);
    4. map.draw(canvas);
    5. }


    If you use this little library, please give me credit somewhere in your plugin.

    ~ECB2
     
  2. Offline

    97WaterPolo

    ECB2
    Any chance you can post images on what this does exactly?
     
  3. Offline

    ECB2

    97waterpolo It can draw Images onto maps with the new map format and colors.
     
    97waterpolo likes this.
  4. Offline

    Garris0n

    I thought Bukkit added the new colors to their API.
     
  5. Offline

    ECB2

    Garris0n Don't think so. Also this makes it much easier to keep the images in memory.
     
  6. Offline

    DarkBladee12

Thread Status:
Not open for further replies.

Share This Page