AutoAttack: Add setting for attack range

This commit is contained in:
ReinforceZwei 2023-01-10 16:52:18 +08:00
parent 7d3512ef87
commit 640abd2d78
3 changed files with 247 additions and 229 deletions

View file

@ -32,6 +32,9 @@ namespace MinecraftClient.ChatBots
[TomlInlineComment("$ChatBot.AutoAttack.Interaction$")]
public InteractType Interaction = InteractType.Attack;
[TomlInlineComment("$ChatBot.AutoAttack.Attack_Range$")]
public int Attack_Range = 4;
[TomlInlineComment("$ChatBot.AutoAttack.Attack_Hostile$")]
public bool Attack_Hostile = true;
@ -107,6 +110,9 @@ namespace MinecraftClient.ChatBots
attackHostile = Config.Attack_Hostile;
attackPassive = Config.Attack_Passive;
attackRange = Config.Attack_Range;
if (attackRange < 1) attackRange = 1;
if (attackRange > 4) attackRange = 4;
}
public override void Initialize()