====== Protect ======
This article is about the Protect hack. For the command, see [[cmd:.protect]].
^ Protect ^^
^Type|[[:Hack]]|
^Category|[[:Combat]]|
^In-game description|"A bot that follows the closest entity and protects it from other entities.\\ Use .protect to protect a specific entity instead of the closest one."|
^[[:keybinds#default_keybinds|Default keybind]]|none|
^Source code|[[w7src>net/wurstclient/hacks/ProtectHack.java]]|
Protect is a Minecraft hack that acts like a combination of [[Follow]] and [[FightBot]]. It will follow the closest entity (known as the "friend") and then attack any other entity that gets too close to the friend (known as the "enemy"). When an enemy is detected, Protect will stop following the friend and start attacking the enemy, until the enemy is either dead or too far away from the friend. Then it will resume following the friend.
===== Settings =====
===== =====
{{page>attack_speed&link&firstseconly}}
==== Use AI (experimental) ====
^ Use AI (experimental) ^^
^Type|Checkbox|
^In-game description|(none)|
^Default value|not checked|
The "Use AI (experimental)" checkbox, when enabled, allows Protect to use Wurst's AI pathfinder to find the best way to reach its target. When disabled, Protect will simply walk towards its target (friend or enemy) in a straight line. This setting is labeled as "experimental" because it is possible for the AI to get stuck in some situations.
==== ====
{{page>pause_on_containers&link&firstseconly}}
==== Filters ====
Protect's filters are very similar to the [[Generic Combat Filter List]]. The only difference is that Protect filters out [[mc>end crystals]] by default.
===== Changes =====
^Version^Changes^
|[[update:Wurst 1.2]]|Added Protect.|
|[[update:Wurst 2.9.1]]|Added FOV slider to [[Killaura]], which at the time also affected Protect.|
|[[update:Wurst 4.5]]|Added cooldown support to Protect (if enabled in [[Killaura]] settings).|
|:::|Improved distance calculations in [[Follow]] and Protect.|
|:::|Fixed Protect not attacking correctly.|
|:::|Fixed Protect not swimming correctly in some situations.|
|[[update:Wurst 6.10]]|Added Protect AI (optional).|
|[[update:Wurst 7.0pre1]]|Temporarily removed Protect.|
|[[update:Wurst 7.0pre25]]|Re-added Protect.|
|:::|Added filters to Protect.|
|:::|Fixed Protect sometimes still rendering a path when the "Use AI" setting is disabled.|
|:::|[[cmd:.protect]] will no longer toggle Protect if no target is specified. (Use ''[[cmd:.t]] protect'' for that.)|
|[[update:Wurst 7.5]]|Added a "Filter armor stands" checkbox to Protect.|
|:::|Protect can now target end crystals.|
|:::|Replaced the "Filter villagers" checkbox in Protect with a "Filter traders" checkbox: when checked, it won't target villagers, wandering traders or modded traders.|
|[[update:Wurst 7.6]]|Added a "Filter named" checkbox to Protect.|
|[[update:Wurst 7.25]]|Added a "Speed" slider to Protect that determines its attack speed. When set to zero, the speed is dynamically adjusted to match your attack cooldown.|
|[[update:Wurst 7.27]]|Added a "Pause on containers" setting to Protect.|
|[[update:Wurst 7.31]]|Fixed [[FightBot]] and Protect still attacking players if they're in your [[friends]] list.|
|[[update:Wurst 7.32]]|Generally improved the aiming logic. All hacks that aim at things should now be a little bit harder for anti-cheat plugins to detect.|
{{tag>has_attack_speed has_pause_on_containers}}