aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.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/CollectItemRuleDefinition.cpp
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp')
-rw-r--r--Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
index 66abefbb..f3b48445 100644
--- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
@@ -22,13 +22,13 @@ void CollectItemRuleDefinition::writeAttributes(DataOutputStream *dos, UINT numA
GameRuleDefinition::writeAttributes(dos, numAttributes + 3);
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_itemId);
- dos->writeUTF( _toString( m_itemId ) );
+ dos->writeUTF( std::to_wstring( m_itemId ) );
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_auxValue);
- dos->writeUTF( _toString( m_auxValue ) );
+ dos->writeUTF( std::to_wstring( m_auxValue ) );
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_quantity);
- dos->writeUTF( _toString( m_quantity ) );
+ dos->writeUTF( std::to_wstring( m_quantity ) );
}
void CollectItemRuleDefinition::addAttribute(const wstring &attributeName, const wstring &attributeValue)
@@ -108,9 +108,9 @@ wstring CollectItemRuleDefinition::generateXml(shared_ptr<ItemInstance> item)
wstring xml = L"";
if(item != NULL)
{
- xml = L"<CollectItemRule itemId=\"" + _toString<int>(item->id) + L"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" promptName=\"OPTIONAL\"";
- if(item->getAuxValue() != 0) xml += L" auxValue=\"" + _toString<int>(item->getAuxValue()) + L"\"";
- if(item->get4JData() != 0) xml += L" dataTag=\"" + _toString<int>(item->get4JData()) + L"\"";
+ xml = L"<CollectItemRule itemId=\"" + std::to_wstring(item->id) + L"\" quantity=\"SET\" descriptionName=\"OPTIONAL\" promptName=\"OPTIONAL\"";
+ if(item->getAuxValue() != 0) xml += L" auxValue=\"" + std::to_wstring(item->getAuxValue()) + L"\"";
+ if(item->get4JData() != 0) xml += L" dataTag=\"" + std::to_wstring(item->get4JData()) + L"\"";
xml += L"/>\n";
}
return xml;