diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:37:16 +0700 |
| commit | 119bff351450ea16ffda550b6e0f67379b29f708 (patch) | |
| tree | d9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/RepairMenu.cpp | |
| parent | 8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff) | |
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/RepairMenu.cpp')
| -rw-r--r-- | Minecraft.World/RepairMenu.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Minecraft.World/RepairMenu.cpp b/Minecraft.World/RepairMenu.cpp index c254eb21..d246b73f 100644 --- a/Minecraft.World/RepairMenu.cpp +++ b/Minecraft.World/RepairMenu.cpp @@ -6,10 +6,10 @@ #include "net.minecraft.world.item.enchantment.h" #include "RepairMenu.h" -RepairMenu::RepairMenu(std::shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt, std::shared_ptr<Player> player) +RepairMenu::RepairMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt, shared_ptr<Player> player) { - resultSlots = std::shared_ptr<ResultContainer>( new ResultContainer() ); - repairSlots = std::shared_ptr<RepairContainer>( new RepairContainer(this,IDS_REPAIR_AND_NAME, 2) ); + resultSlots = shared_ptr<ResultContainer>( new ResultContainer() ); + repairSlots = shared_ptr<RepairContainer>( new RepairContainer(this,IDS_REPAIR_AND_NAME, 2) ); cost = 0; repairItemCountCost = 0; @@ -38,7 +38,7 @@ RepairMenu::RepairMenu(std::shared_ptr<Inventory> inventory, Level *level, int x } } -void RepairMenu::slotsChanged(std::shared_ptr<Container> container) +void RepairMenu::slotsChanged(shared_ptr<Container> container) { AbstractContainerMenu::slotsChanged(); @@ -47,7 +47,7 @@ void RepairMenu::slotsChanged(std::shared_ptr<Container> container) void RepairMenu::createResult() { - std::shared_ptr<ItemInstance> input = repairSlots->getItem(INPUT_SLOT); + shared_ptr<ItemInstance> input = repairSlots->getItem(INPUT_SLOT); cost = 0; int price = 0; int tax = 0; @@ -63,8 +63,8 @@ void RepairMenu::createResult() } else { - std::shared_ptr<ItemInstance> result = input->copy(); - std::shared_ptr<ItemInstance> addition = repairSlots->getItem(ADDITIONAL_SLOT); + shared_ptr<ItemInstance> result = input->copy(); + shared_ptr<ItemInstance> addition = repairSlots->getItem(ADDITIONAL_SLOT); unordered_map<int,int> *enchantments = EnchantmentHelper::getEnchantments(result); bool usingBook = false; @@ -319,14 +319,14 @@ void RepairMenu::setData(int id, int value) if (id == DATA_TOTAL_COST) cost = value; } -void RepairMenu::removed(std::shared_ptr<Player> player) +void RepairMenu::removed(shared_ptr<Player> player) { AbstractContainerMenu::removed(player); if (level->isClientSide) return; for (int i = 0; i < repairSlots->getContainerSize(); i++) { - std::shared_ptr<ItemInstance> item = repairSlots->removeItemNoUpdate(i); + shared_ptr<ItemInstance> item = repairSlots->removeItemNoUpdate(i); if (item != NULL) { player->drop(item); @@ -334,20 +334,20 @@ void RepairMenu::removed(std::shared_ptr<Player> player) } } -bool RepairMenu::stillValid(std::shared_ptr<Player> player) +bool RepairMenu::stillValid(shared_ptr<Player> player) { if (level->getTile(x, y, z) != Tile::anvil_Id) return false; if (player->distanceToSqr(x + 0.5, y + 0.5, z + 0.5) > 8 * 8) return false; return true; } -std::shared_ptr<ItemInstance> RepairMenu::quickMoveStack(std::shared_ptr<Player> player, int slotIndex) +shared_ptr<ItemInstance> RepairMenu::quickMoveStack(shared_ptr<Player> player, int slotIndex) { - std::shared_ptr<ItemInstance> clicked = nullptr; + shared_ptr<ItemInstance> clicked = nullptr; Slot *slot = slots->at(slotIndex); if (slot != NULL && slot->hasItem()) { - std::shared_ptr<ItemInstance> stack = slot->getItem(); + shared_ptr<ItemInstance> stack = slot->getItem(); clicked = stack->copy(); if (slotIndex == RESULT_SLOT) |
