blob: 0736728bc8b85b4b1c06285aa6c7ab97c8e9d717 (
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
|
#pragma once
#include "Entity.h"
class HangingEntity : public Entity
{
public:
eINSTANCEOF GetType() { return eTYPE_HANGING_ENTITY; }
private:
void _init(Level *level);
float offs(int w);
int checkInterval;
//eINSTANCEOF eType;
protected:
virtual void defineSynchedData() {};
public:
int dir;
int xTile, yTile, zTile;
HangingEntity(Level *level);
HangingEntity(Level *level, int xTile, int yTile, int zTile, int dir);
void setDir(int dir);
bool survives();
virtual void tick();
virtual bool isPickable();
virtual bool skipAttackInteraction(std::shared_ptr<Entity> source);
virtual bool hurt(DamageSource *source, int damage);
virtual void move(double xa, double ya, double za, bool noEntityCubes=false); // 4J - added noEntityCubes parameter
virtual void push(double xa, double ya, double za);
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void readAdditionalSaveData(CompoundTag *tag);
virtual int getWidth()=0;
virtual int getHeight()=0;
virtual void dropItem()=0;
};
|