diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-03 06:14:34 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-03 06:14:34 +0700 |
| commit | 13c8bafad57bd081a3e87eb7e67a3a0d98734706 (patch) | |
| tree | 7b5ab6ffd2d550129e77a458295aa6e65da9cb0b /Minecraft.World/BrewingStandMenu.cpp | |
| parent | 41ded31af8767a6a0a0da2075d6bcd7d17078873 (diff) | |
Minor fixes
1. Improve const correctness in a few places (such as `Container::getMaxStackSize()` -> `Container::getMaxStackSize() const`)
2. Use C++11 varargs for `I18n::get`, `Entity::newDoubleList` and `Language::getElement`
Diffstat (limited to 'Minecraft.World/BrewingStandMenu.cpp')
| -rw-r--r-- | Minecraft.World/BrewingStandMenu.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.World/BrewingStandMenu.cpp b/Minecraft.World/BrewingStandMenu.cpp index 55eb953f..eaf78329 100644 --- a/Minecraft.World/BrewingStandMenu.cpp +++ b/Minecraft.World/BrewingStandMenu.cpp @@ -101,7 +101,7 @@ shared_ptr<ItemInstance> BrewingStandMenu::quickMoveStack(shared_ptr<Player> 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::netherwart_seeds_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<ItemInstance> BrewingStandMenu::quickMoveStack(shared_ptr<Player> 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::netherwart_seeds_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)) @@ -140,7 +140,7 @@ shared_ptr<ItemInstance> BrewingStandMenu::quickMoveStack(shared_ptr<Player> pla { return nullptr; } - } + } else if (!moveItemStackTo(stack, INV_SLOT_START, INV_SLOT_END, false)) { return nullptr; @@ -183,7 +183,7 @@ bool BrewingStandMenu::PotionSlot::mayPlace(shared_ptr<ItemInstance> item) return mayPlaceItem(item); } -int BrewingStandMenu::PotionSlot::getMaxStackSize() +int BrewingStandMenu::PotionSlot::getMaxStackSize() const { return 1; } @@ -231,7 +231,7 @@ bool BrewingStandMenu::IngredientsSlot::mayCombine(shared_ptr<ItemInstance> seco return false; } -int BrewingStandMenu::IngredientsSlot::getMaxStackSize() +int BrewingStandMenu::IngredientsSlot::getMaxStackSize() const { return 64; } |
