By continuing to use this site, you agree to the Terms of Service of this website, including usage of cookies.

OK, Don't show this again

A PocketMine-MP Plugin that implements FilledMap
version 1.0.1
Approved
Direct Download How to install?
Switch version
64 Downloads / 142 Total
3 Reviews
Plugin Description §

SimpleMapRenderer

Simple Map Plugin for PocketMine-MP

How to use

Just put the plugin on plugins folder and enjoy it!

API

Get MapFactory instance
$factory = \alvin0319\SimpleMapRenderer\MapFactory::getInstance();
Get MapData object
$mapId = your_map_id;
$mapData = $factory->getMapData($mapId);
Register Map info
$mapId = your_custom_map_id; 
$colors = [];
$center = new Vector3(0, 0, 0);
for($y = 0; $y < 128; $y++){
    for($x = 0; $x < 128; $x++){
        $colors[] = new \pocketmine\utils\Color(mt_rand(0, 128), mt_rand(0, 128), mt_rand(0, 128));
    }
}
$mapData = new \alvin0319\SimpleMapRenderer\data\MapData($mapId, $colors, false, $center);

$factory->registerData($mapData);
Get block color
$block = Level->getBlock($x, $y, $z);
$color = \alvin0319\SimpleMapRenderer\util\MapUtil::getMapColorByBlock($block);
Save image file
$filePath = path_to_your_png_file;
$colors = [];
for($y = 0; $y < 128; $y++){
    for($x = 0; $x < 128; $x++){
        $colors[] = new \pocketmine\utils\Color(mt_rand(0, 128), mt_rand(0, 128), mt_rand(0, 128));
    }
}
\alvin0319\SimpleMapRenderer\util\ImageUtil::toPNG($filePath, $colors);

Note

  • $mapId cannot overlap with an existing ID.
  • The $color must be a two-dimensional array from 0 to 128. (ex: [y][x] = Color)

To-Do

  • Implement MapDecoration (tracking player, mob, etc...)
What's new §
  • Update plugin.yml
  • Updated copyright (happy new year)
  • version bump

ItzFabb-uwu
using v1.0.0
22 Dec 20
gorgioustheboss
using v1.0.0
18 Dec 20
nice plugin ;)
HydroGames-dev
using v1.0.0
12 Dec 20
Nice Plugin Good for making custom map locators for games

Reply to review by :

Supported API versions
3.0.0
->
3.17.0
License §
Categories:
General
Keywords
Permissions
Manage blocks/items
Asynchronous tasks

You can leave one review per plugin release, and delete or update your review at any time

Loading...