So0 earlier this day I added the construct map region packet. I'ts working well, except for one little bug. You have to initialize the code twice to actually see the place, so if I would have this code:
Code:
if (command.startsWith("construct")) {
Palette palette = new Palette();
Tile tile = new Tile(3222, 3222, 0);
PaletteTile paletteTile = new PaletteTile(tile.getTileX(), tile.getTileY(), 0);
palette.setTile(6, 6, 0, paletteTile);
for (int j = -3; j < 3; j++) {
for (int i = -3; i < 3; i++) {
PaletteTile palTile = new PaletteTile(tile.getTileX() + (8 * j), tile.getTileY() + (8 * i), 0);
palette.setTile(6 + j, 6 + i, 0, palTile);
}
}
c.getPA().sendConstructMapRegion(palette);
c.getPA().movePlayer(50, 50, 0);
}
and I type ::construct, it will send me to a black map, and only show the actual map when I type ::construct again. Am I doing something wrong here?