From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.World/BrewingStandMenu.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'Minecraft.World/BrewingStandMenu.cpp') diff --git a/Minecraft.World/BrewingStandMenu.cpp b/Minecraft.World/BrewingStandMenu.cpp index af1fac5c..55eb953f 100644 --- a/Minecraft.World/BrewingStandMenu.cpp +++ b/Minecraft.World/BrewingStandMenu.cpp @@ -41,7 +41,7 @@ void BrewingStandMenu::broadcastChanges() AbstractContainerMenu::broadcastChanges(); //for (int i = 0; i < containerListeners->size(); i++) - for(AUTO_VAR(it, containerListeners->begin()); it != containerListeners->end(); ++it) + for(AUTO_VAR(it, containerListeners.begin()); it != containerListeners.end(); ++it) { ContainerListener *listener = *it; //containerListeners.at(i); if (tc != brewingStand->getBrewTime()) @@ -65,11 +65,11 @@ bool BrewingStandMenu::stillValid(shared_ptr player) shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr player, int slotIndex) { shared_ptr clicked = nullptr; - Slot *slot = slots->at(slotIndex); - Slot *IngredientSlot = slots->at(INGREDIENT_SLOT); - Slot *PotionSlot1 = slots->at(BOTTLE_SLOT_START); - Slot *PotionSlot2 = slots->at(BOTTLE_SLOT_START+1); - Slot *PotionSlot3 = slots->at(BOTTLE_SLOT_START+2); + Slot *slot = slots.at(slotIndex); + Slot *IngredientSlot = slots.at(INGREDIENT_SLOT); + Slot *PotionSlot1 = slots.at(BOTTLE_SLOT_START); + Slot *PotionSlot2 = slots.at(BOTTLE_SLOT_START+1); + Slot *PotionSlot3 = slots.at(BOTTLE_SLOT_START+2); if (slot != NULL && slot->hasItem()) { @@ -101,7 +101,7 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla else if (slotIndex >= INV_SLOT_START && slotIndex < INV_SLOT_END) { // 4J-PB - if the item is an ingredient, quickmove it into the ingredient slot - if( (Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherStalkSeeds_Id) ) && + if( (Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id) ) && (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) ) ) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) @@ -125,7 +125,7 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla else if (slotIndex >= USE_ROW_SLOT_START && slotIndex < USE_ROW_SLOT_END) { // 4J-PB - if the item is an ingredient, quickmove it into the ingredient slot - if((Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherStalkSeeds_Id)) && + if((Item::items[stack->id]->hasPotionBrewingFormula() || (stack->id == Item::netherwart_seeds_Id)) && (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) )) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) @@ -190,9 +190,7 @@ int BrewingStandMenu::PotionSlot::getMaxStackSize() void BrewingStandMenu::PotionSlot::onTake(shared_ptr player, shared_ptr carried) { - carried->onCraftedBy(this->player->level, dynamic_pointer_cast( this->player->shared_from_this() ), 1); - if (carried->id == Item::potion_Id && carried->getAuxValue() > 0) - this->player->awardStat(GenericStats::potion(),GenericStats::param_potion()); + if (carried->id == Item::potion_Id && carried->getAuxValue() > 0) this->player->awardStat(GenericStats::potion(),GenericStats::param_potion()); Slot::onTake(player, carried); } @@ -222,7 +220,7 @@ bool BrewingStandMenu::IngredientsSlot::mayPlace(shared_ptr item) } else { - return Item::items[item->id]->hasPotionBrewingFormula() || item->id == Item::netherStalkSeeds_Id || item->id == Item::bucket_water_Id; + return Item::items[item->id]->hasPotionBrewingFormula() || item->id == Item::netherwart_seeds_Id || item->id == Item::bucket_water_Id; } } return false; -- cgit v1.2.3