Files
LegacyRenouveau/Minecraft.World/UntouchingEnchantment.cpp
T
Tranqlmao d1bf3952cd TU43 Release 3
+ Gameplay changes
Stained clay renamed to "Hardened Clay" (e.g. White Hardened Clay)
Gold ore now generates in mesa biomes between Y=32 and Y=79
Shears can no longer be enchanted with Silk Touch
Pigs can be led/bred with potatoes and beetroots (in addition to carrots)
Elder Guardians now drop dry sponges instead of wet sponges
Endermen now spawn in the Nether
2026-07-07 15:07:01 -04:00

33 lines
762 B
C++

#include "stdafx.h"
#include "net.minecraft.world.item.h"
#include "UntouchingEnchantment.h"
UntouchingEnchantment::UntouchingEnchantment(int id, int frequency) : Enchantment(id, frequency, EnchantmentCategory::digger)
{
setDescriptionId(IDS_ENCHANTMENT_UNTOUCHING);
}
int UntouchingEnchantment::getMinCost(int level)
{
return 15;
}
int UntouchingEnchantment::getMaxCost(int level)
{
return Enchantment::getMinCost(level) + 50;
}
int UntouchingEnchantment::getMaxLevel()
{
return 1;
}
bool UntouchingEnchantment::isCompatibleWith(Enchantment *other) const
{
return Enchantment::isCompatibleWith(other) && other->id != resourceBonus->id;
}
bool UntouchingEnchantment::canEnchant(shared_ptr<ItemInstance> item)
{
return Enchantment::canEnchant(item);
}