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 "Entity.h"
4#include "Projectile.h"
5
6class Mob;
7class HitResult;
8
9class Throwable : public Entity, public Projectile
10{
11private:
12 int xTile;
13 int yTile;
14 int zTile;
15 int lastTile;
16
17protected:
18 bool inGround;
19
20public:
21 int shakeTime;
22
23 shared_ptr<LivingEntity> owner;
24
25private:
26 wstring ownerName;
27 int life;
28 int flightTime;
29
30 void _throwableInit();
31
32public:
33 Throwable(Level *level);
34
35protected:
36 virtual void defineSynchedData();
37
38public:
39 virtual bool shouldRenderAtSqrDistance(double distance);
40
41 Throwable(Level *level, shared_ptr<LivingEntity> mob);
42 Throwable(Level *level, double x, double y, double z);
43
44protected:
45 virtual float getThrowPower();
46 virtual float getThrowUpAngleOffset();
47
48public:
49 virtual void shoot(double xd, double yd, double zd, float pow, float uncertainty);
50 virtual void lerpMotion(double xd, double yd, double zd);
51 virtual void tick();
52
53protected:
54 virtual float getGravity();
55 virtual void onHit(HitResult *res) = 0;
56
57public:
58 virtual void addAdditonalSaveData(CompoundTag *tag);
59 virtual void readAdditionalSaveData(CompoundTag *tag);
60 virtual float getShadowHeightOffs();
61 virtual shared_ptr<LivingEntity> getOwner();
62};