the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "Mob.h"
4
5#ifdef __PSVITA__
6#include "..\Minecraft.Client\PSVita\PSVitaExtras\CustomMap.h"
7#endif
8
9class Player;
10class Level;
11
12class MobSpawner
13{
14private:
15 static const int MIN_SPAWN_DISTANCE;
16
17protected:
18 static TilePos getRandomPosWithin(Level *level, int cx, int cz);
19
20private:
21#ifdef __PSVITA__
22 // AP - See CustomMap.h for an explanation of this
23 static CustomMap chunksToPoll;
24#else
25 static unordered_map<ChunkPos,bool,ChunkPosKeyHash,ChunkPosKeyEq> chunksToPoll;
26#endif
27
28public:
29 static const int tick(ServerLevel *level, bool spawnEnemies, bool spawnFriendlies, bool spawnPersistent);
30 static bool isSpawnPositionOk(MobCategory *category, Level *level, int x, int y, int z);
31
32public:
33 static bool attackSleepingPlayers(Level *level, vector<shared_ptr<Player> > *players);
34
35 static void postProcessSpawnMobs(Level *level, Biome *biome, int xo, int zo, int cellWidth, int cellHeight, Random *random);
36};