mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Support use left hand
This commit is contained in:
parent
effb3050b4
commit
ccb8610020
5 changed files with 24 additions and 1 deletions
|
|
@ -188,7 +188,10 @@ namespace MinecraftClient.ChatBots
|
||||||
|
|
||||||
private void UseFishRod()
|
private void UseFishRod()
|
||||||
{
|
{
|
||||||
|
if (Settings.AutoFishing_Mainhand)
|
||||||
UseItemInHand();
|
UseItemInHand();
|
||||||
|
else
|
||||||
|
UseItemInLeftHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1277,6 +1277,15 @@ namespace MinecraftClient
|
||||||
return InvokeOnMainThread(() => handler.SendUseItem(0, this.sequenceId));
|
return InvokeOnMainThread(() => handler.SendUseItem(0, this.sequenceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use the item currently in the player's left hand
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>TRUE if the item was successfully used</returns>
|
||||||
|
public bool UseItemOnLeftHand()
|
||||||
|
{
|
||||||
|
return InvokeOnMainThread(() => handler.SendUseItem(1, this.sequenceId));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Try to merge a slot
|
/// Try to merge a slot
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,7 @@ interaction=Attack # Possible values: Interact, Attack (default)
|
||||||
# /!\ Make sure server rules allow automated farming before using this bot
|
# /!\ Make sure server rules allow automated farming before using this bot
|
||||||
enabled=false
|
enabled=false
|
||||||
antidespawn=false
|
antidespawn=false
|
||||||
|
main_hand=true # Use the main hand or the second hand to hold the rod
|
||||||
fishing_delay=3.0 # How long after entering the game to start fishing (seconds).
|
fishing_delay=3.0 # How long after entering the game to start fishing (seconds).
|
||||||
fishing_timeout=600.0 # Fishing timeout (seconds). Timeout will re-cast the rod
|
fishing_timeout=600.0 # Fishing timeout (seconds). Timeout will re-cast the rod
|
||||||
fishing_hook_threshold=0.2 # Fish hooks moving on the Y-axis above this threshold will be considered to have caught a fish.
|
fishing_hook_threshold=0.2 # Fish hooks moving on the Y-axis above this threshold will be considered to have caught a fish.
|
||||||
|
|
|
||||||
|
|
@ -1262,6 +1262,15 @@ namespace MinecraftClient
|
||||||
return Handler.UseItemOnHand();
|
return Handler.UseItemOnHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use item currently in the player's hand (active inventory bar slot)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>TRUE if successful</returns>
|
||||||
|
protected bool UseItemInLeftHand()
|
||||||
|
{
|
||||||
|
return Handler.UseItemOnLeftHand();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check inventory handling enable status
|
/// Check inventory handling enable status
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ namespace MinecraftClient
|
||||||
//Auto Fishing
|
//Auto Fishing
|
||||||
public static bool AutoFishing_Enabled = false;
|
public static bool AutoFishing_Enabled = false;
|
||||||
public static bool AutoFishing_Antidespawn = false;
|
public static bool AutoFishing_Antidespawn = false;
|
||||||
|
public static bool AutoFishing_Mainhand = true;
|
||||||
public static double AutoFishing_FishingDelay = 3.0;
|
public static double AutoFishing_FishingDelay = 3.0;
|
||||||
public static double AutoFishing_FishingTimeout = 600.0;
|
public static double AutoFishing_FishingTimeout = 600.0;
|
||||||
public static double AutoFishing_FishingHookThreshold = 0.2;
|
public static double AutoFishing_FishingHookThreshold = 0.2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue