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()
|
||||
{
|
||||
UseItemInHand();
|
||||
if (Settings.AutoFishing_Mainhand)
|
||||
UseItemInHand();
|
||||
else
|
||||
UseItemInLeftHand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1277,6 +1277,15 @@ namespace MinecraftClient
|
|||
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>
|
||||
/// Try to merge a slot
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ interaction=Attack # Possible values: Interact, Attack (default)
|
|||
# /!\ Make sure server rules allow automated farming before using this bot
|
||||
enabled=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_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.
|
||||
|
|
|
|||
|
|
@ -1262,6 +1262,15 @@ namespace MinecraftClient
|
|||
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>
|
||||
/// Check inventory handling enable status
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ namespace MinecraftClient
|
|||
//Auto Fishing
|
||||
public static bool AutoFishing_Enabled = false;
|
||||
public static bool AutoFishing_Antidespawn = false;
|
||||
public static bool AutoFishing_Mainhand = true;
|
||||
public static double AutoFishing_FishingDelay = 3.0;
|
||||
public static double AutoFishing_FishingTimeout = 600.0;
|
||||
public static double AutoFishing_FishingHookThreshold = 0.2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue