public static void exports ( Media configMinimap , Map < TileRef , ColorRgba > tiles ) { Check . notNull ( configMinimap ) ; Check . notNull ( tiles ) ; final Map < ColorRgba , Collection < TileRef > > colors = convertToColorKey ( tiles ) ; final Xml nodeMinimap = new Xml ( NODE_MINIMAP ) ; for ( final Map . Entry < ColorRgba , Collection < TileRef > > entry : colors . entrySet ( ) ) { final ColorRgba color = entry . getKey ( ) ; final Xml nodeColor = nodeMinimap . createChild ( NODE_COLOR ) ; nodeColor . writeInteger ( ATT_COLOR_RED , color . getRed ( ) ) ; nodeColor . writeInteger ( ATT_COLOR_GREEN , color . getGreen ( ) ) ; nodeColor . writeInteger ( ATT_COLOR_BLUE , color . getBlue ( ) ) ; for ( final TileRef tileRef : entry . getValue ( ) ) { final Xml nodeTileRef = TileConfig . exports ( tileRef ) ; nodeColor . add ( nodeTileRef ) ; } } nodeMinimap . save ( configMinimap ) ; }
Export tiles colors data to configuration media .