diff options
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 041a64a7..651cd3a1 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, 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, std::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, sha this->zt = zt; } -bool RepairResultSlot::mayPlace(shared_ptr<ItemInstance> item) +bool RepairResultSlot::mayPlace(std::shared_ptr<ItemInstance> item) { return false; } -bool RepairResultSlot::mayPickup(shared_ptr<Player> player) +bool RepairResultSlot::mayPickup(std::shared_ptr<Player> player) { return (player->abilities.instabuild || player->experienceLevel >= m_menu->cost) && (m_menu->cost > 0 && hasItem()); } -void RepairResultSlot::onTake(shared_ptr<Player> player, shared_ptr<ItemInstance> carried) +void RepairResultSlot::onTake(std::shared_ptr<Player> player, std::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) { - shared_ptr<ItemInstance> addition = m_menu->repairSlots->getItem(RepairMenu::ADDITIONAL_SLOT); + std::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(shared_ptr<Player> player, shared_ptr<ItemInstance } } -bool RepairResultSlot::mayCombine(shared_ptr<ItemInstance> second) +bool RepairResultSlot::mayCombine(std::shared_ptr<ItemInstance> second) { return false; }
\ No newline at end of file |
