From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.World/MerchantRecipe.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/MerchantRecipe.cpp') diff --git a/Minecraft.World/MerchantRecipe.cpp b/Minecraft.World/MerchantRecipe.cpp index b4eb1b54..b772b0c7 100644 --- a/Minecraft.World/MerchantRecipe.cpp +++ b/Minecraft.World/MerchantRecipe.cpp @@ -34,12 +34,12 @@ MerchantRecipe::MerchantRecipe(shared_ptr buy, shared_ptr buy, Item *sell) { - _init(buy, nullptr, std::make_shared(sell)); + _init(buy, nullptr, shared_ptr(new ItemInstance(sell))); } MerchantRecipe::MerchantRecipe(shared_ptr buy, Tile *sell) { - _init(buy, nullptr, std::make_shared(sell)); + _init(buy, nullptr, shared_ptr(new ItemInstance(sell))); } shared_ptr MerchantRecipe::getBuyAItem() @@ -54,7 +54,7 @@ shared_ptr MerchantRecipe::getBuyBItem() bool MerchantRecipe::hasSecondaryBuyItem() { - return buyB != nullptr; + return buyB != NULL; } shared_ptr MerchantRecipe::getSellItem() @@ -68,13 +68,13 @@ bool MerchantRecipe::isSame(MerchantRecipe *other) { return false; } - return (buyB == nullptr && other->buyB == nullptr) || (buyB != nullptr && other->buyB != nullptr && buyB->id == other->buyB->id); + return (buyB == NULL && other->buyB == NULL) || (buyB != NULL && other->buyB != NULL && buyB->id == other->buyB->id); } bool MerchantRecipe::isSameSameButBetter(MerchantRecipe *other) { // same deal, but cheaper - return isSame(other) && (buyA->count < other->buyA->count || (buyB != nullptr && buyB->count < other->buyB->count)); + return isSame(other) && (buyA->count < other->buyA->count || (buyB != NULL && buyB->count < other->buyB->count)); } int MerchantRecipe::getUses() @@ -136,7 +136,7 @@ CompoundTag *MerchantRecipe::createTag() CompoundTag *tag = new CompoundTag(); tag->putCompound(L"buy", buyA->save(new CompoundTag(L"buy"))); tag->putCompound(L"sell", sell->save(new CompoundTag(L"sell"))); - if (buyB != nullptr) + if (buyB != NULL) { tag->putCompound(L"buyB", buyB->save(new CompoundTag(L"buyB"))); } -- cgit v1.2.3