@Override
    public void render(Graphics2D g, LevelEditorComponent ed)
    {
        int X = this.X * 16;
        int Y = this.Y * 16;
        Rectangle srcRect = new Rectangle(0, 0, 16, 16);
        Rectangle destRect = new Rectangle(X, Y, 16, 16);

        for (int xx = 0; xx < CachedObj.length; xx++)
            for (int yy = 0; yy < CachedObj[0].length; yy++)
            {
                int t = CachedObj[xx][yy];
                if (t < 0)
                    continue;

                destRect.x = X + xx * 16;
                destRect.y = Y + yy * 16;

                srcRect.x = (t % 16) * 16;
                srcRect.y = (t / 16) * 16;

                g.drawImage(GFX.Tilesets[Tileset].Map16Buffer, destRect.x, destRect.y, destRect.x + 16, destRect.y + 16, srcRect.x, srcRect.y, srcRect.x + 16, srcRect.y + 16, null);

                if (!GFX.Tilesets[Tileset].UseOverrides)
                    continue;
                int t2 = GFX.Tilesets[Tileset].Overrides[t];
                if (t2 <= 0)
                    continue;

                srcRect.x = t2 * 16;
                srcRect.y = 0;

                g.drawImage(GFX.Tilesets[Tileset].OverrideBufferedImage, destRect.x, destRect.y, destRect.x + 16, destRect.y + 16, srcRect.x, srcRect.y, srcRect.x + 16, srcRect.y + 16, null);
                //int overridenum = Array.IndexOf(NSMBTileset.BehaviorOverrides, GFX.Tilesets[Tileset].TileBehaviors[t]);
                //if (overridenum > -1)
                //    g.drawImage(Resources.get("tileoverrides2"), destRect.x, destRect.y, new Rectangle(overridenum * 16, 0, 16, 16), GraphicsUnit.Pixel);
            }
    }