From a20b18a00f9e66eaedf0841ba13a8619feec173a Mon Sep 17 00:00:00 2001 From: DrPerkyLegit Date: Sat, 30 May 2026 01:13:53 -0400 Subject: [PATCH] temp fix for particle effect crash --- Minecraft.World/PotionBrewing.cpp | 34 +------------------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/Minecraft.World/PotionBrewing.cpp b/Minecraft.World/PotionBrewing.cpp index bc5fd8c..080f6b2 100644 --- a/Minecraft.World/PotionBrewing.cpp +++ b/Minecraft.World/PotionBrewing.cpp @@ -182,39 +182,7 @@ int PotionBrewing::getAppearanceValue(int brew) int PotionBrewing::getColorValue(vector *effects) { - ColourTable *colourTable = Minecraft::GetInstance()->getColourTable(); - - int baseColor = colourTable->getColor( eMinecraftColour_Potion_BaseColour ); - - if (effects == nullptr || effects->empty()) - { - return baseColor; - } - - float red = 0; - float green = 0; - float blue = 0; - float count = 0; - - //for (MobEffectInstance effect : effects){ - for(auto& effect : *effects) - { - int potionColor = colourTable->getColor( MobEffect::effects[effect->getId()]->getColor() ); - - for (int potency = 0; potency <= effect->getAmplifier(); potency++) - { - red += static_cast((potionColor >> 16) & 0xff) / 255.0f; - green += static_cast((potionColor >> 8) & 0xff) / 255.0f; - blue += static_cast((potionColor >> 0) & 0xff) / 255.0f; - count++; - } - } - - red = (red / count) * 255.0f; - green = (green / count) * 255.0f; - blue = (blue / count) * 255.0f; - - return static_cast(red) << 16 | static_cast(green) << 8 | static_cast(blue); + return 0; //todo: reimplement this } bool PotionBrewing::areAllEffectsAmbient(vector *effects)