mirror of
https://gitea.sffnetwork.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-11-24 19:39:47 +00:00
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
60
src/world/entity/MobCategory.h
Executable file
60
src/world/entity/MobCategory.h
Executable file
|
|
@ -0,0 +1,60 @@
|
|||
//package net.minecraft.world.entity;
|
||||
|
||||
#include "../../platform/log.h"
|
||||
|
||||
class Material;
|
||||
|
||||
class MobCategory
|
||||
{
|
||||
public:
|
||||
static void initMobCategories();
|
||||
|
||||
//
|
||||
static const MobCategory monster;
|
||||
static const MobCategory creature;
|
||||
static const MobCategory waterCreature;
|
||||
//@todo: rewrite to std::vector with [] init
|
||||
static const MobCategory* const values[];
|
||||
static const int numValues;
|
||||
|
||||
int getBaseClassId() const {
|
||||
return _baseClassId;
|
||||
}
|
||||
|
||||
int getMaxInstancesPerChunk() const {
|
||||
return _max;
|
||||
}
|
||||
|
||||
int getMaxInstancesPerLevel() const {
|
||||
return _maxPerLevel;
|
||||
}
|
||||
|
||||
const Material* getSpawnPositionMaterial() const {
|
||||
return _spawnPositionMaterial;
|
||||
}
|
||||
|
||||
bool isFriendly() const {
|
||||
return _isFriendly;
|
||||
}
|
||||
|
||||
private:
|
||||
const int _baseClassId;
|
||||
const int _max;
|
||||
const int _maxPerLevel;
|
||||
mutable const Material* _spawnPositionMaterial;
|
||||
const bool _isFriendly;
|
||||
|
||||
MobCategory(int baseClassId, int max, int maxPerLevel, bool isFriendly)
|
||||
: _baseClassId(baseClassId),
|
||||
_max(max),
|
||||
_maxPerLevel(maxPerLevel),
|
||||
_spawnPositionMaterial(NULL),
|
||||
_isFriendly(isFriendly)
|
||||
{
|
||||
//LOGI("Creating a Mobcategory: %d, %d, %p, %d ", _baseClassId, _max, _spawnPositionMaterial, _isFriendly);
|
||||
}
|
||||
|
||||
void setMaterial(const Material* material) const {
|
||||
_spawnPositionMaterial = material;
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue