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/ShapedRecipy.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.World/ShapedRecipy.cpp') diff --git a/Minecraft.World/ShapedRecipy.cpp b/Minecraft.World/ShapedRecipy.cpp index 7a0e85b0..ee737321 100644 --- a/Minecraft.World/ShapedRecipy.cpp +++ b/Minecraft.World/ShapedRecipy.cpp @@ -52,18 +52,18 @@ bool ShapedRecipy::matches(shared_ptr craftSlots, int xOffs, for (int y = 0; y < 3; y++) { int xs = x - xOffs; int ys = y - yOffs; - ItemInstance *expected = nullptr; + ItemInstance *expected = NULL; if (xs >= 0 && ys >= 0 && xs < width && ys < height) { if (xFlip) expected = recipeItems[(width - xs - 1) + ys * width]; else expected = recipeItems[xs + ys * width]; } shared_ptr item = craftSlots->getItem(x, y); - if (item == nullptr && expected == nullptr) + if (item == NULL && expected == NULL) { continue; } - if ((item == nullptr && expected != nullptr) || (item != nullptr && expected == nullptr)) + if ((item == NULL && expected != NULL) || (item != NULL && expected == NULL)) { return false; } @@ -84,15 +84,15 @@ shared_ptr ShapedRecipy::assemble(shared_ptr cr { shared_ptr result = getResultItem()->copy(); - if (_keepTag && craftSlots != nullptr) + if (_keepTag && craftSlots != NULL) { for (int i = 0; i < craftSlots->getContainerSize(); i++) { shared_ptr item = craftSlots->getItem(i); - if (item != nullptr && item->hasTag()) + if (item != NULL && item->hasTag()) { - result->setTag(static_cast(item->tag->copy())); + result->setTag((CompoundTag *) item->tag->copy()); } } } @@ -117,7 +117,7 @@ bool ShapedRecipy::reqs(int iRecipe) if (x < width && y < height) { ItemInstance *expected = recipeItems[x+y*width]; - if (expected!=nullptr) + if (expected!=NULL) { //printf("\tIngredient %d is %d\n",iCount++,expected->id); } @@ -159,7 +159,7 @@ void ShapedRecipy::reqs(INGREDIENTS_REQUIRED *pIngReq) { ItemInstance *expected = recipeItems[x+y*width]; - if (expected!=nullptr) + if (expected!=NULL) { int iAuxVal = expected->getAuxValue(); TempIngReq.uiGridA[x+y*3]=expected->id | iAuxVal<<24; -- cgit v1.2.3