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 "Enchantment.h"
4
5class ProtectionEnchantment : public Enchantment
6{
7public:
8 static const int ALL = 0;
9 static const int FIRE = 1;
10 static const int FALL = 2;
11 static const int EXPLOSION = 3;
12 static const int PROJECTILE = 4;
13
14private:
15 static const int names[];
16 static const int minCost[];
17 static const int levelCost[];
18 static const int levelCostSpan[];
19
20public:
21 const int type;
22
23 ProtectionEnchantment(int id, int frequency, int type);
24
25 virtual int getMinCost(int level);
26 virtual int getMaxCost(int level);
27 virtual int getMaxLevel();
28 virtual int getDamageProtection(int level, DamageSource *source);
29 virtual int getDescriptionId();
30 virtual bool isCompatibleWith(Enchantment *other) const;
31 static int getFireAfterDampener(shared_ptr<Entity> entity, int time);
32 static double getExplosionKnockbackAfterDampener(shared_ptr<Entity> entity, double power);
33};