diff --git a/Minecraft.Client/Common/Potion_Macros.h b/Minecraft.Client/Common/Potion_Macros.h index d458ac4b..165ba95f 100644 --- a/Minecraft.Client/Common/Potion_Macros.h +++ b/Minecraft.Client/Common/Potion_Macros.h @@ -14,6 +14,16 @@ #define MASK_STRENGTH 0x2009 #define MASK_SLOWNESS 0x200A #define MASK_INSTANTDAMAGE 0x200C +#define MASK_WATERBREATHING 0x200F +#define MASK_JUMPBOOST 0x200B + +// note from fireblade: good luck here +// if youre adding a new potion, i genuinely hope you know what youre doing +// i legit had to guess for both waterbreathing and jump boost +// dont do 0x2007 or 0x200D btw, they show up as 'artless potion' and 'clear potion' resectively +// i have no idea how this system works besides that, and therefore i wish you the best of luck towards adding new potions in this game + +// george if you happen to be stalking my commit messages again btw please for the love of god figure out how this system works and get back to me accordingly #define MASK_TYPE_AWKWARD 0x0010 @@ -37,6 +47,8 @@ #define MACRO_POTION_IS_INSTANTDAMAGE(aux) ((aux & 0x200F) == MASK_INSTANTDAMAGE) #define MACRO_POTION_IS_NIGHTVISION(aux) ((aux & 0x200F) == MASK_NIGHTVISION) #define MACRO_POTION_IS_INVISIBILITY(aux) ((aux & 0x200F) == MASK_INVISIBILITY) +#define MACRO_POTION_IS_WATERBREATHING(aux) ((aux & 0x200F) == MASK_WATERBREATHING) +#define MACRO_POTION_IS_JUMPBOOST(aux) ((aux & 0x200F) == MASK_JUMPBOOST) #define MACRO_POTION_IS_SPLASH(aux) ((aux & MASK_SPLASH) == MASK_SPLASH) #define MACRO_POTION_IS_BOTTLE(aux) ((aux & MASK_SPLASH) == 0) diff --git a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp index a3877a0a..4ddbd620 100644 --- a/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp @@ -682,6 +682,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_STRENGTH)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_SLOWNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_INSTANTDAMAGE)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_WATERBREATHING)) + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_JUMPBOOST)) + // end of tu31 potions ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_REGENERATION)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_SPEED)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_FIRE_RESISTANCE)) @@ -691,6 +695,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_STRENGTH)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_SLOWNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_INSTANTDAMAGE)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_WATERBREATHING)) + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_JUMPBOOST)) + // end of tu31 potions DEF(eCreativeInventory_Potions_Level2) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_REGENERATION)) @@ -704,6 +712,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_SLOWNESS)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_WATERBREATHING)) // i have no idea why water breathing had a level 2 version in the creative menu + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_JUMPBOOST)) + // end of tu31 potions //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INSTANTDAMAGE)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_REGENERATION)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_SPEED)) @@ -715,6 +727,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_SLOWNESS)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_WATERBREATHING)) // i have no idea why water breathing had a level 2 version in the creative menu + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_JUMPBOOST)) + // end of tu31 potions //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_INSTANTDAMAGE)) DEF(eCreativeInventory_Potions_Extended) @@ -727,6 +743,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_INVISIBILITY)) // 4J- Moved here as there isn't a weak variant of this potion. //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_STRENGTH)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_WATERBREATHING)) + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_JUMPBOOST)) + // end of tu31 potions //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_SLOWNESS)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INSTANTDAMAGE)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_REGENERATION)) @@ -738,6 +758,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, 0, MASK_INVISIBILITY)) // 4J- Moved here as there isn't a weak variant of this potion. //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_WEAKNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_STRENGTH)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_WATERBREATHING)) + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_JUMPBOOST)) + // end of tu31 potions //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_SLOWNESS)) //ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_INSTANTDAMAGE)) @@ -755,6 +779,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2EXTENDED, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_EXTENDED, MASK_SLOWNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2, MASK_INSTANTDAMAGE)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2EXTENDED, MASK_WATERBREATHING)) // i have + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, MASK_LEVEL2EXTENDED, MASK_JUMPBOOST)) + // end of tu31 potions ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2EXTENDED, MASK_REGENERATION)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2EXTENDED, MASK_SPEED)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_FIRE_RESISTANCE)) @@ -768,6 +796,10 @@ void IUIScene_CreativeMenu::staticCtor() ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2EXTENDED, MASK_STRENGTH)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_EXTENDED, MASK_SLOWNESS)) ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2, MASK_INSTANTDAMAGE)) + // tu31 potions + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2EXTENDED, MASK_WATERBREATHING)) // i have no idea why water breathing had a level 2 version in the creative menu + ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(MASK_SPLASH, MASK_LEVEL2EXTENDED, MASK_JUMPBOOST)) + // end of tu31 potions specs = new TabSpec*[eCreativeInventoryTab_COUNT]; diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/colours.col b/Minecraft.Client/Common/res/TitleUpdate/res/colours.col index 06565ed6..60257b37 100644 Binary files a/Minecraft.Client/Common/res/TitleUpdate/res/colours.col and b/Minecraft.Client/Common/res/TitleUpdate/res/colours.col differ diff --git a/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml b/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml index 80c0f495..4e823132 100644 --- a/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml +++ b/Minecraft.Client/Common/res/TitleUpdate/res/colours.xml @@ -214,7 +214,7 @@ if __name__=="__main__": notecolors() - + diff --git a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml index 3dc913a4..ae19b1d3 100644 --- a/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml +++ b/Minecraft.Client/Windows64Media/loc/stringsGeneric.xml @@ -7926,6 +7926,14 @@ Would you like to install the mash-up pack or texture pack now? Reduces health of the affected players, animals and monsters over time. + + Allows affected players to breathe normally underwater. + + + + Increases the jump height of the affected player. + + When Applied: diff --git a/Minecraft.World/BrewingStandMenu.cpp b/Minecraft.World/BrewingStandMenu.cpp index 2200f47c..d705f220 100644 --- a/Minecraft.World/BrewingStandMenu.cpp +++ b/Minecraft.World/BrewingStandMenu.cpp @@ -69,6 +69,34 @@ shared_ptr BrewingStandMenu::quickMoveStack(shared_ptr pla Slot *PotionSlot2 = slots.at(BOTTLE_SLOT_START+1); Slot *PotionSlot3 = slots.at(BOTTLE_SLOT_START+2); + auto canShiftIntoIngredient = [&](shared_ptr stackToMove) -> bool + { + if (stackToMove == nullptr || !ingredientSlot->mayPlace(stackToMove)) + { + return false; + } + + if (!IngredientSlot->hasItem()) + { + return true; + } + + shared_ptr ingredientStack = IngredientSlot->getItem(); + if (ingredientStack == nullptr || ingredientStack->id != stackToMove->id) + { + return false; + } + + Item *ingredientBase = Item::items[ingredientStack->id]; + if (dynamic_cast(ingredientBase) != nullptr) + { + // pufferfish only + return stackToMove->getAuxValue() == 3; + } + + return true; + }; + if (slot != nullptr && slot->hasItem()) { shared_ptr stack = slot->getItem(); @@ -99,8 +127,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::netherwart_seeds_Id) ) && - (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) ) ) + if (canShiftIntoIngredient(stack)) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) { @@ -123,8 +150,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::netherwart_seeds_Id)) && - (!IngredientSlot->hasItem() || (stack->id==IngredientSlot->getItem()->id) )) + if (canShiftIntoIngredient(stack)) { if(!moveItemStackTo(stack, INGREDIENT_SLOT, INGREDIENT_SLOT+1, false)) { @@ -202,8 +228,6 @@ bool BrewingStandMenu::PotionSlot::mayPlaceItem(shared_ptr item) return item != nullptr && (item->id == Item::potion_Id || item->id == Item::glassBottle_Id); } - - BrewingStandMenu::IngredientsSlot::IngredientsSlot(shared_ptr container, int slot, int x, int y) : Slot(container, slot, x ,y) { } @@ -214,7 +238,14 @@ bool BrewingStandMenu::IngredientsSlot::mayPlace(shared_ptr item) { if (PotionBrewing::SIMPLIFIED_BREWING) { - return Item::items[item->id]->hasPotionBrewingFormula(); + Item* base = Item::items[item->id]; + + if (FishFoodItem* fish = dynamic_cast(base)) + { + return item->getAuxValue() == 3; + } + + return base->hasPotionBrewingFormula(); } else { diff --git a/Minecraft.World/Item.cpp b/Minecraft.World/Item.cpp index ed0bbbf3..f46a57e3 100644 --- a/Minecraft.World/Item.cpp +++ b/Minecraft.World/Item.cpp @@ -403,7 +403,7 @@ void Item::staticCtor() Item::egg = ( new EggItem(88) ) ->setIconName(L"egg")->setDescriptionId(IDS_ITEM_EGG)->setUseDescriptionId(IDS_DESC_EGG); Item::fishingRod = static_cast((new FishingRodItem(90))->setBaseItemTypeAndMaterial(eBaseItemType_rod, eMaterial_wood)->setIconName(L"fishingRod")->setDescriptionId(IDS_ITEM_FISHING_ROD)->setUseDescriptionId(IDS_DESC_FISHINGROD)); Item::yellowDust = ( new Item(92) ) ->setIconName(L"yellowDust")->setDescriptionId(IDS_ITEM_YELLOW_DUST)->setUseDescriptionId(IDS_DESC_YELLOW_DUST)->setPotionBrewingFormula(PotionBrewing::MOD_GLOWSTONE); - Item::fish_raw = ( new FishFoodItem(93, false) ) ->setIconName(L"fishRaw")->setDescriptionId(IDS_ITEM_FISH_RAW)->setUseDescriptionId(IDS_DESC_FISH_RAW)->setStackedByData(true); + Item::fish_raw = ( new FishFoodItem(93, false) ) ->setIconName(L"fishRaw")->setDescriptionId(IDS_ITEM_FISH_RAW)->setUseDescriptionId(IDS_DESC_FISH_RAW)->setStackedByData(true)->setPotionBrewingFormula(PotionBrewing::MOD_PUFFERFISH); Item::fish_cooked = (new FishFoodItem(94, true)) ->setIconName(L"fishCooked")->setDescriptionId(IDS_ITEM_FISH_COOKED)->setUseDescriptionId(IDS_DESC_FISH_COOKED)->setStackedByData(true); Item::dye_powder = ( new DyePowderItem(95) ) ->setBaseItemTypeAndMaterial(eBaseItemType_dyepowder, eMaterial_dye)->setIconName(L"dyePowder")->setDescriptionId(IDS_ITEM_DYE_POWDER)->setUseDescriptionId(-1); @@ -535,7 +535,7 @@ void Item::staticCtor() Item::door_dark = (new DoorItem(175, Material::wood, L"doorDark"))->setBaseItemTypeAndMaterial(eBaseItemType_door, eMaterial_wood)->setIconName(L"doorDark")->setDescriptionId(IDS_ITEM_DOOR_DARK)->setUseDescriptionId(IDS_DESC_DOOR_WOOD); Item::rabbit_hide = ( new Item(159) ) ->setIconName(L"rabbitHide")->setDescriptionId(IDS_ITEM_RABBIT_HIDE)->setUseDescriptionId(IDS_DESC_RABBIT_HIDE); - Item::rabbits_foot = ( new Item(158) ) ->setIconName(L"rabbitsFoot")->setDescriptionId(IDS_ITEM_RABBIT_FOOT)->setUseDescriptionId(IDS_DESC_RABBIT_FOOT); + Item::rabbits_foot = ( new Item(158) ) ->setIconName(L"rabbitsFoot")->setDescriptionId(IDS_ITEM_RABBIT_FOOT)->setUseDescriptionId(IDS_DESC_RABBIT_FOOT)->setPotionBrewingFormula(PotionBrewing::MOD_RABBITS_FOOT);; Item::armor_stand = (new ArmorStandItem(160)) ->setBaseItemTypeAndMaterial(eBaseItemType_HangingItem,eMaterial_cloth)->setIconName(L"armorStand")->setDescriptionId(IDS_ITEM_ARMOR_STAND)->setUseDescriptionId(IDS_DESC_ARMOR_STAND); Item::prismarine_crystal = (new Item(154))->setIconName(L"prismarineCrystal")->setDescriptionId(IDS_ITEM_PRISMARINE_CRYSTAL)->setUseDescriptionId(IDS_ITEM_PRISMARINE_CRYSTAL_DESC); diff --git a/Minecraft.World/PotionBrewing.cpp b/Minecraft.World/PotionBrewing.cpp index f980977c..7a9a877a 100644 --- a/Minecraft.World/PotionBrewing.cpp +++ b/Minecraft.World/PotionBrewing.cpp @@ -81,6 +81,8 @@ const wstring PotionBrewing::MOD_REDSTONE = L"-5+6-7"; // redstone increases dur const wstring PotionBrewing::MOD_GLOWSTONE = L"+5-6-7"; // glowstone increases amplification // 4J Stu - Don't require bit 13 to be set. We don't use it in the creative menu. Side effect is you can make a (virtually useless) Splash Mundane potion with water bottle and gunpowder const wstring PotionBrewing::MOD_GUNPOWDER = L"+14";//&13-13"; // gunpowder makes them throwable! // gunpowder requires 13 and sets 14 +const wstring PotionBrewing::MOD_RABBITS_FOOT = L"+0+1-2+3&4-4+13"; +const wstring PotionBrewing::MOD_PUFFERFISH = L"+0+1+2+3&4-4+13"; #else const wstring PotionBrewing::MOD_WATER = L"-1-3-5-7-9-11-13"; const wstring PotionBrewing::MOD_SUGAR = L"+0"; @@ -114,6 +116,8 @@ void PotionBrewing::staticCtor() potionEffectDuration.insert(intStringMap::value_type( MobEffect::damageBoost->getId(), L"0 & !1 & !2 & 3 & 3+6" )); potionEffectDuration.insert(intStringMap::value_type( MobEffect::nightVision->getId(), L"!0 & 1 & 2 & !3 & 2+6" )); potionEffectDuration.insert(intStringMap::value_type( MobEffect::invisibility->getId(), L"!0 & 1 & 2 & 3 & 2+6" )); + potionEffectDuration.insert(intStringMap::value_type( MobEffect::jump->getId(), L"0 & 1 & !2 & 3 & 0+6" )); + potionEffectDuration.insert(intStringMap::value_type( MobEffect::waterBreathing->getId(), L"0 & 1 & 2 & 3 & 0+6" )); // glowstone increases amplification potionEffectAmplifier.insert(intStringMap::value_type( MobEffect::movementSpeed->getId(), L"5" )); @@ -124,6 +128,7 @@ void PotionBrewing::staticCtor() potionEffectAmplifier.insert(intStringMap::value_type( MobEffect::heal->getId(), L"5" )); potionEffectAmplifier.insert(intStringMap::value_type( MobEffect::damageResistance->getId(), L"5" )); potionEffectAmplifier.insert(intStringMap::value_type( MobEffect::poison->getId(), L"5" )); + potionEffectAmplifier.insert(intStringMap::value_type( MobEffect::jump->getId(), L"5" )); #else potionEffectDuration.put(movementSpeed.getId(), "!10 & !4 & 5*2+0 & >1 | !7 & !4 & 5*2+0 & >1"); potionEffectDuration.put(movementSlowdown.getId(), "10 & 7 & !4 & 7+5+1-0"); diff --git a/Minecraft.World/PotionBrewing.h b/Minecraft.World/PotionBrewing.h index 8f110c93..739881a3 100644 --- a/Minecraft.World/PotionBrewing.h +++ b/Minecraft.World/PotionBrewing.h @@ -35,6 +35,8 @@ public: static const wstring MOD_NETHERWART; static const wstring MOD_GUNPOWDER; static const wstring MOD_GOLDENCARROT; + static const wstring MOD_RABBITS_FOOT; + static const wstring MOD_PUFFERFISH; static const int BITS_FOR_MAX_NORMAL_EFFECT = 0xF; static const int BITS_FOR_DURATION = (1 << 5); diff --git a/Minecraft.World/PotionItem.cpp b/Minecraft.World/PotionItem.cpp index fd156883..58d91ce6 100644 --- a/Minecraft.World/PotionItem.cpp +++ b/Minecraft.World/PotionItem.cpp @@ -353,6 +353,8 @@ unsigned int PotionItem::getUseDescriptionId(shared_ptr instance) else if( MACRO_POTION_IS_SLOWNESS(brew)) return IDS_POTION_DESC_MOVESLOWDOWN; else if( MACRO_POTION_IS_POISON(brew)) return IDS_POTION_DESC_POISON; else if( MACRO_POTION_IS_INSTANTDAMAGE(brew)) return IDS_POTION_DESC_HARM; + else if( MACRO_POTION_IS_WATERBREATHING(brew)) return IDS_POTION_DESC_WATERBREATHING; + else if( MACRO_POTION_IS_JUMPBOOST(brew)) return IDS_POTION_DESC_JUMPBOOST; return IDS_POTION_DESC_EMPTY; }