first commit

This commit is contained in:
murdle
2026-03-01 02:38:58 +02:00
commit 19250b9db4
19111 changed files with 4358159 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "stdafx.h"
#include "net.minecraft.world.item.h"
#include "DiggingEnchantment.h"
DiggingEnchantment::DiggingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger)
{
setDescriptionId(IDS_ENCHANTMENT_DIGGING);
}
int DiggingEnchantment::getMinCost(int level)
{
return 1 + 10 * (level - 1);
}
int DiggingEnchantment::getMaxCost(int level)
{
return Enchantment::getMinCost(level) + 50;
}
int DiggingEnchantment::getMaxLevel()
{
return 5;
}
bool DiggingEnchantment::canEnchant(shared_ptr<ItemInstance> item)
{
if (item->getItem()->id == Item::shears_Id) return true;
return Enchantment::canEnchant(item);
}