the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "BossMob.h"
3#include "MultiEntityMob.h"
4#include "MultiEntityMobPart.h"
5
6MultiEntityMobPart::MultiEntityMobPart(shared_ptr<MultiEntityMob>parentMob, const wstring &id, float w, float h) : Entity(parentMob->getLevel()), parentMob( parentMob ), id( id )
7{
8 // 4J Stu - This function call had to be moved here from the Entity ctor to ensure that
9 // the derived version of the function is called
10 this->defineSynchedData();
11
12 setSize(w, h);
13}
14
15
16void MultiEntityMobPart::defineSynchedData()
17{
18}
19
20void MultiEntityMobPart::readAdditionalSaveData(CompoundTag *tag)
21{
22}
23
24void MultiEntityMobPart::addAdditonalSaveData(CompoundTag *tag)
25{
26}
27
28
29bool MultiEntityMobPart::isPickable()
30{
31 return true;
32}
33
34bool MultiEntityMobPart::hurt(DamageSource *source, float damage)
35{
36 return parentMob.lock()->hurt( dynamic_pointer_cast<MultiEntityMobPart>( shared_from_this() ), source, damage);
37}
38
39bool MultiEntityMobPart::is(shared_ptr<Entity> other)
40{
41 return shared_from_this() == other || parentMob.lock() == dynamic_pointer_cast<MultiEntityMob>(other);
42}