Make maps render faster

Discussion in 'Plugin Development' started by Zimbaway, Sep 19, 2012.

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

    Zimbaway

    Is it possible to make the held map render faster? Im making text render on it. It tells you your chunk position but the words render quite slowly. Is their anyway to fix this?
     
  2. Offline

    desht

    Yep, player.sendMap(map), where map is your MapView object. You can call this from the render() method, but be aware that it will trigger another call to render(), so in that case protect it with some kind of boolean flag, e.g.:

    PHP:
    public void render(MapView mapMapCanvas canvasPlayer player) {
      if (
    redrawNeeded) {
        
    // do the redrawing work
        
    redrawNeeded false;
        
    player.sendMap(map);
      }
    }
    and then you can set the redrawNeeded flag to true elsewhere, when the data that you're rendering changes.
     
    madmac likes this.
  3. Offline

    Zimbaway

    Thanks :D
     
  4. Offline

    Vandrake

    Mind If I ask you one thing? How do I get the Goddamn Canvas!? XD Ive been reading the damn docs and I can't find a way to do it. I know how to get the MapView but no Canvas x.x
     
  5. Offline

    one4me

    Vandrake likes this.
Thread Status:
Not open for further replies.

Share This Page