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/RepairResultSlot.cpp | |
| parent | 8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff) | |
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/RepairResultSlot.cpp')
| -rw-r--r-- | Minecraft.World/RepairResultSlot.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Minecraft.World/RepairResultSlot.cpp b/Minecraft.World/RepairResultSlot.cpp index 651cd3a1..041a64a7 100644 --- a/Minecraft.World/RepairResultSlot.cpp +++ b/Minecraft.World/RepairResultSlot.cpp @@ -5,7 +5,7 @@ #include "net.minecraft.world.entity.player.h" #include "RepairResultSlot.h" -RepairResultSlot::RepairResultSlot(RepairMenu *menu, int xt, int yt, int zt, std::shared_ptr<Container> container, int slot, int x, int y) : Slot(container, slot, x, y) +RepairResultSlot::RepairResultSlot(RepairMenu *menu, int xt, int yt, int zt, shared_ptr<Container> container, int slot, int x, int y) : Slot(container, slot, x, y) { m_menu = menu; this->xt = xt; @@ -13,23 +13,23 @@ RepairResultSlot::RepairResultSlot(RepairMenu *menu, int xt, int yt, int zt, std this->zt = zt; } -bool RepairResultSlot::mayPlace(std::shared_ptr<ItemInstance> item) +bool RepairResultSlot::mayPlace(shared_ptr<ItemInstance> item) { return false; } -bool RepairResultSlot::mayPickup(std::shared_ptr<Player> player) +bool RepairResultSlot::mayPickup(shared_ptr<Player> player) { return (player->abilities.instabuild || player->experienceLevel >= m_menu->cost) && (m_menu->cost > 0 && hasItem()); } -void RepairResultSlot::onTake(std::shared_ptr<Player> player, std::shared_ptr<ItemInstance> carried) +void RepairResultSlot::onTake(shared_ptr<Player> player, shared_ptr<ItemInstance> carried) { if (!player->abilities.instabuild) player->withdrawExperienceLevels(m_menu->cost); m_menu->repairSlots->setItem(RepairMenu::INPUT_SLOT, nullptr); if (m_menu->repairItemCountCost > 0) { - std::shared_ptr<ItemInstance> addition = m_menu->repairSlots->getItem(RepairMenu::ADDITIONAL_SLOT); + shared_ptr<ItemInstance> addition = m_menu->repairSlots->getItem(RepairMenu::ADDITIONAL_SLOT); if (addition != NULL && addition->count > m_menu->repairItemCountCost) { addition->count -= m_menu->repairItemCountCost; @@ -69,7 +69,7 @@ void RepairResultSlot::onTake(std::shared_ptr<Player> player, std::shared_ptr<It } } -bool RepairResultSlot::mayCombine(std::shared_ptr<ItemInstance> second) +bool RepairResultSlot::mayCombine(shared_ptr<ItemInstance> second) { return false; }
\ No newline at end of file |
