the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 34 lines 820 B view raw
1#include "stdafx.h" 2#include "net.minecraft.world.item.h" 3#include "UntouchingEnchantment.h" 4 5UntouchingEnchantment::UntouchingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger) 6{ 7 setDescriptionId(IDS_ENCHANTMENT_UNTOUCHING); 8} 9 10int UntouchingEnchantment::getMinCost(int level) 11{ 12 return 15; 13} 14 15int UntouchingEnchantment::getMaxCost(int level) 16{ 17 return Enchantment::getMinCost(level) + 50; 18} 19 20int UntouchingEnchantment::getMaxLevel() 21{ 22 return 1; 23} 24 25bool UntouchingEnchantment::isCompatibleWith(Enchantment *other) const 26{ 27 return Enchantment::isCompatibleWith(other) && other->id != resourceBonus->id; 28} 29 30bool UntouchingEnchantment::canEnchant(shared_ptr<ItemInstance> item) 31{ 32 if (item->getItem()->id == Item::shears_Id) return true; 33 return Enchantment::canEnchant(item); 34}