mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-29 10:24:46 +00:00
TU19: merge Minecraft.World/Containers
keeping virtual destructors where possible
This commit is contained in:
@@ -42,8 +42,8 @@ void MerchantMenu::broadcastChanges() {
|
||||
AbstractContainerMenu::broadcastChanges();
|
||||
}
|
||||
|
||||
// 4J used to take a std::shared_ptr<Container> but wasn't using it, so removed
|
||||
// to simplify things
|
||||
// 4J used to take a shared_ptr<Container> but wasn't using it, so removed to
|
||||
// simplify things
|
||||
void MerchantMenu::slotsChanged() {
|
||||
tradeContainer->updateSellItem();
|
||||
AbstractContainerMenu::slotsChanged();
|
||||
@@ -64,7 +64,7 @@ std::shared_ptr<ItemInstance> MerchantMenu::quickMoveStack(
|
||||
std::shared_ptr<ItemInstance> clicked = nullptr;
|
||||
Slot* slot = NULL;
|
||||
|
||||
if (slotIndex < slots->size()) slot = slots->at(slotIndex);
|
||||
if (slotIndex < slots.size()) slot = slots.at(slotIndex);
|
||||
if (slot != NULL && slot->hasItem()) {
|
||||
std::shared_ptr<ItemInstance> stack = slot->getItem();
|
||||
clicked = stack->copy();
|
||||
|
||||
Reference in New Issue
Block a user