summaryrefslogtreecommitdiffstats
path: root/src/Entities/EntityEffect.cpp
diff options
context:
space:
mode:
authorSpongecade <spongecade.129@gmail.com>2023-09-27 20:07:42 +0200
committerGitHub <noreply@github.com>2023-09-27 20:07:42 +0200
commitebeb164d2be6754908a9c562850e585f18f70b88 (patch)
treef0396dc592063fab48a622049ac43e35a8bc9f66 /src/Entities/EntityEffect.cpp
parentOnly enable werror for debug (#5501) (diff)
downloadcuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar.gz
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar.bz2
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar.lz
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar.xz
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.tar.zst
cuberite-ebeb164d2be6754908a9c562850e585f18f70b88.zip
Diffstat (limited to 'src/Entities/EntityEffect.cpp')
-rw-r--r--src/Entities/EntityEffect.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index ef38e3a80..ea3a90d9d 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -23,7 +23,7 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage)
{
// Lowest four bits
// Potion effect bits are different from entity effect values
- // For reference: https://minecraft.gamepedia.com/Java_Edition_data_values#.22Potion_effect.22_bits
+ // For reference: https://minecraft.wiki/w/Java_Edition_data_values#.22Potion_effect.22_bits
switch (a_ItemDamage & 0x0f)
{
case 0x01: return cEntityEffect::effRegeneration;
@@ -112,9 +112,9 @@ int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
SplashCoeff = IsPotionDrinkable(a_ItemDamage) ? 1 : 0.75;
// Ref.:
- // https://minecraft.gamepedia.com/Java_Edition_data_values#.22Tier.22_bit
- // https://minecraft.gamepedia.com/Java_Edition_data_values#.22Extended_duration.22_bit
- // https://minecraft.gamepedia.com/Java_Edition_data_values#.22Splash_potion.22_bit
+ // https://minecraft.wiki/w/Java_Edition_data_values#.22Tier.22_bit
+ // https://minecraft.wiki/w/Java_Edition_data_values#.22Extended_duration.22_bit
+ // https://minecraft.wiki/w/Java_Edition_data_values#.22Splash_potion.22_bit
return static_cast<int>(base * TierCoeff * ExtCoeff * SplashCoeff);
}
@@ -127,7 +127,7 @@ bool cEntityEffect::IsPotionDrinkable(short a_ItemDamage)
{
// Potions are drinkable if they are not splash potions.
// i.e. potions are drinkable if the 14th lowest bit is not set
- // Ref.: https://minecraft.gamepedia.com/Java_Edition_data_values#.22Splash_potion.22_bit
+ // Ref.: https://minecraft.wiki/w/Java_Edition_data_values#.22Splash_potion.22_bit
return ((a_ItemDamage & 0x4000) == 0);
}