diff options
author | Spongecade <spongecade.129@gmail.com> | 2023-09-27 20:07:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-27 20:07:42 +0200 |
commit | ebeb164d2be6754908a9c562850e585f18f70b88 (patch) | |
tree | f0396dc592063fab48a622049ac43e35a8bc9f66 /src/Entities | |
parent | Only enable werror for debug (#5501) (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Entities/Entity.cpp | 14 | ||||
-rw-r--r-- | src/Entities/Entity.h | 2 | ||||
-rw-r--r-- | src/Entities/EntityEffect.cpp | 10 | ||||
-rw-r--r-- | src/Entities/FireChargeEntity.cpp | 2 | ||||
-rw-r--r-- | src/Entities/Pawn.cpp | 2 | ||||
-rw-r--r-- | src/Entities/Pawn.h | 2 | ||||
-rw-r--r-- | src/Entities/Player.cpp | 10 | ||||
-rw-r--r-- | src/Entities/Player.h | 10 |
8 files changed, 26 insertions, 26 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 4d61a5744..26ee7ed6f 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -442,7 +442,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) bool MagicalCriticalHit = false; // IsOnGround() only is false if the player is moving downwards - // Ref: https://minecraft.gamepedia.com/Damage#Critical_Hits + // Ref: https://minecraft.wiki/w/Damage#Critical_Hits if (!Player->IsOnGround()) { if ((a_TDI.DamageType == dtAttack) || (a_TDI.DamageType == dtArrowAttack)) @@ -501,7 +501,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) // The duration of the effect is a random value between 1 and 1.5 seconds at level I, // increasing the max duration by 0.5 seconds each level. - // Ref: https://minecraft.gamepedia.com/Enchanting#Bane_of_Arthropods + // Ref: https://minecraft.wiki/w/Enchanting#Bane_of_Arthropods int Duration = 20 + GetRandomProvider().RandInt(BaneOfArthropodsLevel * 10); // Duration in ticks. Monster->AddEntityEffect(cEntityEffect::effSlowness, Duration, 4); @@ -614,7 +614,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) int cEntity::GetRawDamageAgainst(const cEntity & a_Receiver) { // Returns the hitpoints that this pawn can deal to a_Receiver using its equipped items - // Ref: https://minecraft.gamepedia.com/Damage#Dealing_damage as of 2012_12_20 + // Ref: https://minecraft.wiki/w/Damage#Dealing_damage as of 2012_12_20 switch (this->GetEquippedWeapon().m_ItemType) { case E_ITEM_WOODEN_SWORD: return 4; @@ -660,7 +660,7 @@ void cEntity::ApplyArmorDamage(int DamageBlocked) bool cEntity::ArmorCoversAgainst(eDamageType a_DamageType) { - // Ref.: https://minecraft.gamepedia.com/Armor#Effects as of 2012_12_20 + // Ref.: https://minecraft.wiki/w/Armor#Effects as of 2012_12_20 switch (a_DamageType) { case dtOnFire: @@ -777,7 +777,7 @@ float cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Da } // Add up all armor points: - // Ref.: https://minecraft.gamepedia.com/Armor#Defense_points + // Ref.: https://minecraft.wiki/w/Armor#Defense_points int ArmorValue = 0; int Toughness = 0; switch (GetEquippedHelmet().m_ItemType) @@ -814,7 +814,7 @@ float cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Da } // TODO: Special armor cases, such as wool, saddles, dog's collar - // Ref.: https://minecraft.gamepedia.com/Armor#Mob_armor as of 2012_12_20 + // Ref.: https://minecraft.wiki/w/Armor#Mob_armor as of 2012_12_20 float Reduction = std::max(ArmorValue / 5.0f, ArmorValue - a_Damage / (2.0f + Toughness / 4.0f)); return (a_Damage * std::min(20.0f, Reduction) / 25.0f); @@ -1797,7 +1797,7 @@ void cEntity::SetSize(const float a_Width, const float a_Height) void cEntity::HandleAir(void) { - // Ref.: https://minecraft.gamepedia.com/Chunk_format + // Ref.: https://minecraft.wiki/w/Chunk_format // See if the entity is /submerged/ water (head is in water) // Get the type of block the entity is standing in: diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 2f9ba229b..1f0c6e107 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -610,7 +610,7 @@ protected: /** Stores the air drag that is applied to the entity every tick, measured in speed ratio per tick Acts as air friction and slows down flight Will be interpolated if the server tick rate varies - Data: https://minecraft.gamepedia.com/Entity#Motion_of_entities */ + Data: https://minecraft.wiki/w/Entity#Motion_of_entities */ float m_AirDrag; /** Last position sent to client via the Relative Move or Teleport packets (not Velocity) 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); } diff --git a/src/Entities/FireChargeEntity.cpp b/src/Entities/FireChargeEntity.cpp index 7971c4cb7..edbc05e2c 100644 --- a/src/Entities/FireChargeEntity.cpp +++ b/src/Entities/FireChargeEntity.cpp @@ -50,7 +50,7 @@ void cFireChargeEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos) if (!a_EntityHit.IsFireproof()) { - // TODO Damage Entity with 5 damage(from https://minecraft.gamepedia.com/Blaze#Blaze_fireball) + // TODO Damage Entity with 5 damage(from https://minecraft.wiki/w/Blaze#Blaze_fireball) a_EntityHit.StartBurning(5 * 20); // 5 seconds of burning } } diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp index 4e7ef206f..61653acd2 100644 --- a/src/Entities/Pawn.cpp +++ b/src/Entities/Pawn.cpp @@ -654,7 +654,7 @@ bool cPawn::FindTeleportDestination(cWorld & a_World, const int a_HeightRequired /* Algorithm: Choose random destination. - Seek downwards, regardless of distance until the block is made of movement-blocking material: https://minecraft.fandom.com/wiki/Materials + Seek downwards, regardless of distance until the block is made of movement-blocking material: https://minecraft.wiki/w/Materials Succeeds if no liquid or solid blocks prevents from standing at destination. */ auto & Random = GetRandomProvider(); diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h index 5aae1c21f..721f9deb2 100644 --- a/src/Entities/Pawn.h +++ b/src/Entities/Pawn.h @@ -91,7 +91,7 @@ public: Checks for valid destinations in a cube of length 2 * a_HalfCubeWidth centred at a_Centre. Returns true and places destination in a_Destination if successful. Returns false if destination could be found after a_NumTries attempts. - Details at: https://minecraft.fandom.com/wiki/Enderman#Teleportation. */ + Details at: https://minecraft.wiki/w/Enderman#Teleportation. */ static bool FindTeleportDestination(cWorld & a_World, const int a_HeightRequired, const unsigned int a_NumTries, Vector3d & a_Destination, Vector3i a_Centre, const int a_HalfCubeWidth); // tolua_end diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index ba1059b7c..c580d8293 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -2069,7 +2069,7 @@ void cPlayer::UseItem(int a_SlotNumber, short a_Damage) return; } - // Ref: https://minecraft.gamepedia.com/Enchanting#Unbreaking + // Ref: https://minecraft.wiki/w/Enchanting#Unbreaking unsigned int UnbreakingLevel = Item.m_Enchantments.GetLevel(cEnchantments::enchUnbreaking); double chance = ItemCategory::IsArmor(Item.m_ItemType) ? (0.6 + (0.4 / (UnbreakingLevel + 1))) : (1.0 / (UnbreakingLevel + 1)); @@ -2115,7 +2115,7 @@ void cPlayer::UseItem(int a_SlotNumber, short a_Damage) void cPlayer::HandleFood(void) { - // Ref.: https://minecraft.gamepedia.com/Hunger + // Ref.: https://minecraft.wiki/w/Hunger if (IsGameModeCreative() || IsGameModeSpectator()) { @@ -2606,7 +2606,7 @@ bool cPlayer::IsInsideWater() float cPlayer::GetDigSpeed(BLOCKTYPE a_Block) { - // Based on: https://minecraft.gamepedia.com/Breaking#Speed + // Based on: https://minecraft.wiki/w/Breaking#Speed // Get the base speed multiplier of the equipped tool for the mined block float MiningSpeed = GetEquippedItem().GetHandler().GetBlockBreakingStrength(a_Block); @@ -2672,7 +2672,7 @@ float cPlayer::GetDigSpeed(BLOCKTYPE a_Block) float cPlayer::GetMiningProgressPerTick(BLOCKTYPE a_Block) { - // Based on https://minecraft.gamepedia.com/Breaking#Calculation + // Based on https://minecraft.wiki/w/Breaking#Calculation // If we know it's instantly breakable then quit here: if (cBlockInfo::IsOneHitDig(a_Block)) { @@ -2695,7 +2695,7 @@ float cPlayer::GetMiningProgressPerTick(BLOCKTYPE a_Block) bool cPlayer::CanInstantlyMine(BLOCKTYPE a_Block) { - // Based on: https://minecraft.gamepedia.com/Breaking#Calculation + // Based on: https://minecraft.wiki/w/Breaking#Calculation // If the dig speed is greater than 30 times the hardness, then the wiki says we can instantly mine: return GetDigSpeed(a_Block) > (30 * cBlockInfo::GetHardness(a_Block)); diff --git a/src/Entities/Player.h b/src/Entities/Player.h index 87b3accda..cee8a1a9c 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -123,12 +123,12 @@ public: float GetXpPercentage(void) const; /** Calculates the amount of XP needed for a given level - Ref: https://minecraft.gamepedia.com/XP + Ref: https://minecraft.wiki/w/XP */ static int XpForLevel(int a_Level); /** Inverse of XpForLevel - Ref: https://minecraft.gamepedia.com/XP + Ref: https://minecraft.wiki/w/XP values are as per this with pre-calculations */ static int CalcLevelFromXp(int a_CurrentXp); @@ -580,13 +580,13 @@ public: /** Returns the progress mined per tick for the block a_Block as a fraction (1 would be completely mined) Depends on hardness values so check those are correct. - Source: https://minecraft.gamepedia.com/Breaking#Calculation */ + Source: https://minecraft.wiki/w/Breaking#Calculation */ float GetMiningProgressPerTick(BLOCKTYPE a_Block); /** Given tool, enchantments, status effects, and world position returns whether a_Block would be instantly mined. Depends on hardness values so check those are correct. - Source: https://minecraft.gamepedia.com/Breaking#Instant_breaking */ + Source: https://minecraft.wiki/w/Breaking#Instant_breaking */ bool CanInstantlyMine(BLOCKTYPE a_Block); /** Adds an Item to the list of known items. @@ -779,7 +779,7 @@ private: If he has an enchanted tool with efficiency or he has a haste or mining fatique effect it gets multiplied by a specific factor depending on the strength of the effect or enchantment. In he is in water it gets divided by 5 except if his tool is enchanted with aqua affinity. If he is not on ground it also gets divided by 5. - Source: https://minecraft.gamepedia.com/Breaking#Calculation */ + Source: https://minecraft.wiki/w/Breaking#Calculation */ float GetDigSpeed(BLOCKTYPE a_Block); /** Add the recipe Id to the known recipes. |