aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-05 17:17:45 -0600
committerGitHub <noreply@github.com>2026-03-05 17:17:45 -0600
commit0666959d312dc74903f55d1071488a90239330f1 (patch)
tree5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp')
-rw-r--r--Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
index eabc1401..555ed8b4 100644
--- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
@@ -14,10 +14,10 @@ void AddEnchantmentRuleDefinition::writeAttributes(DataOutputStream *dos, UINT n
GameRuleDefinition::writeAttributes(dos, numAttributes + 2);
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_enchantmentId);
- dos->writeUTF( _toString( m_enchantmentId ) );
+ dos->writeUTF( std::to_wstring( m_enchantmentId ) );
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_enchantmentLevel);
- dos->writeUTF( _toString( m_enchantmentLevel ) );
+ dos->writeUTF( std::to_wstring( m_enchantmentLevel ) );
}
void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue)
@@ -50,7 +50,7 @@ bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr<ItemInstance> item)
{
// 4J-JEV: Ripped code from enchantmenthelpers
// Maybe we want to add an addEnchantment method to EnchantmentHelpers
- if (item->id == Item::enchantedBook_Id)
+ if (item->id == Item::enchantedBook_Id)
{
Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) );
}