aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/BossMobPart.cpp
blob: 923972ad2d70ce776bf4a1093cba254d0f54b24d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "stdafx.h"
#include "BossMob.h"
#include "BossMobPart.h"



BossMobPart::BossMobPart(BossMob *bossMob, const wstring &id, float w, float h) : Entity(bossMob->level), bossMob( bossMob ), id( id )
{
	// 4J Stu - This function call had to be moved here from the Entity ctor to ensure that
	// the derived version of the function is called
	this->defineSynchedData();

	setSize(w, h);
}


void BossMobPart::defineSynchedData()
{
}

void BossMobPart::readAdditionalSaveData(CompoundTag *tag)
{
}

void BossMobPart::addAdditonalSaveData(CompoundTag *tag)
{
}


bool BossMobPart::isPickable()
{
	return true;
}

bool BossMobPart::hurt(DamageSource *source, int damage)
{
	return bossMob->hurt( dynamic_pointer_cast<BossMobPart>( shared_from_this() ), source, damage);
}

bool BossMobPart::is(shared_ptr<Entity> other)
{
	return shared_from_this() == other || bossMob == other.get();
}