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/CraftingMenu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Minecraft.World/CraftingMenu.cpp') diff --git a/Minecraft.World/CraftingMenu.cpp b/Minecraft.World/CraftingMenu.cpp index 6f24d310..c104bbec 100644 --- a/Minecraft.World/CraftingMenu.cpp +++ b/Minecraft.World/CraftingMenu.cpp @@ -19,8 +19,8 @@ const int CraftingMenu::USE_ROW_SLOT_END = CraftingMenu::USE_ROW_SLOT_START + 9; CraftingMenu::CraftingMenu(shared_ptr inventory, Level *level, int xt, int yt, int zt) : AbstractContainerMenu() { - craftSlots = std::make_shared(this, 3, 3); - resultSlots = std::make_shared(); + craftSlots = shared_ptr( new CraftingContainer(this, 3, 3) ); + resultSlots = shared_ptr( new ResultContainer() ); this->level = level; x = xt; @@ -64,7 +64,7 @@ void CraftingMenu::removed(shared_ptr player) for (int i = 0; i < 9; i++) { shared_ptr item = craftSlots->removeItemNoUpdate(i); - if (item != nullptr) + if (item != NULL) { player->drop(item); } @@ -82,7 +82,7 @@ shared_ptr CraftingMenu::quickMoveStack(shared_ptr player, { shared_ptr clicked = nullptr; Slot *slot = slots.at(slotIndex); - if (slot != nullptr && slot->hasItem()) + if (slot != NULL && slot->hasItem()) { shared_ptr stack = slot->getItem(); clicked = stack->copy(); -- cgit v1.2.3