TU19: merge Minecraft.World/Containers

keeping virtual destructors where possible
This commit is contained in:
Tropical
2026-03-21 15:18:52 -05:00
parent db0a6b2e6a
commit f25cd66f4d
56 changed files with 1412 additions and 373 deletions

View File

@@ -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();