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 "net.minecraft.world.item.h"
3#include "DiggingEnchantment.h"
4
5DiggingEnchantment::DiggingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger)
6{
7 setDescriptionId(IDS_ENCHANTMENT_DIGGING);
8}
9
10int DiggingEnchantment::getMinCost(int level)
11{
12 return 1 + 10 * (level - 1);
13}
14
15int DiggingEnchantment::getMaxCost(int level)
16{
17 return Enchantment::getMinCost(level) + 50;
18}
19
20int DiggingEnchantment::getMaxLevel()
21{
22 return 5;
23}
24
25bool DiggingEnchantment::canEnchant(shared_ptr<ItemInstance> item)
26{
27 if (item->getItem()->id == Item::shears_Id) return true;
28 return Enchantment::canEnchant(item);
29}