mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Added ShiftRightClick (#2582)
* Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Added ShiftRightClick * Updated Protocol18.cs ShiftRightClick Description for ReinforceZwei's Suggestion * Just Deleted Added ShiftRightClick's Description Line * Just Deleted Added ShiftRightClick's Description Lines * Made Change With Informaiton ReinforceZwei Given to Me About Switch-Case and Shorten the Code. * Re Added Lines That Got Deleted By Mistake * Add translation key for shift right-click --------- Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
This commit is contained in:
parent
37bcad37e0
commit
968f864f34
7 changed files with 5938 additions and 3896 deletions
|
|
@ -16,6 +16,7 @@ namespace MinecraftClient.CommandHandler.ArgumentType
|
||||||
WindowActionType.RightClick,
|
WindowActionType.RightClick,
|
||||||
WindowActionType.MiddleClick,
|
WindowActionType.MiddleClick,
|
||||||
WindowActionType.ShiftClick,
|
WindowActionType.ShiftClick,
|
||||||
|
WindowActionType.ShiftRightClick,
|
||||||
};
|
};
|
||||||
|
|
||||||
public override WindowActionType Parse(IStringReader reader)
|
public override WindowActionType Parse(IStringReader reader)
|
||||||
|
|
@ -33,6 +34,7 @@ namespace MinecraftClient.CommandHandler.ArgumentType
|
||||||
"middleclick" => WindowActionType.MiddleClick,
|
"middleclick" => WindowActionType.MiddleClick,
|
||||||
"shift" => WindowActionType.ShiftClick,
|
"shift" => WindowActionType.ShiftClick,
|
||||||
"shiftclick" => WindowActionType.ShiftClick,
|
"shiftclick" => WindowActionType.ShiftClick,
|
||||||
|
"shiftrightclick" => WindowActionType.ShiftRightClick,
|
||||||
_ => throw CommandSyntaxException.BuiltInExceptions.LiteralIncorrect().CreateWithContext(reader, inputStr)
|
_ => throw CommandSyntaxException.BuiltInExceptions.LiteralIncorrect().CreateWithContext(reader, inputStr)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ namespace MinecraftClient.Commands
|
||||||
#pragma warning disable format // @formatter:off
|
#pragma warning disable format // @formatter:off
|
||||||
"list" => Translations.cmd_inventory_help_list + usageStr + "/inventory <player|container|<id>> list",
|
"list" => Translations.cmd_inventory_help_list + usageStr + "/inventory <player|container|<id>> list",
|
||||||
"close" => Translations.cmd_inventory_help_close + usageStr + "/inventory <player|container|<id>> close",
|
"close" => Translations.cmd_inventory_help_close + usageStr + "/inventory <player|container|<id>> close",
|
||||||
"click" => Translations.cmd_inventory_help_click + usageStr + "/inventory <player|container|<id>> click <slot> [left|right|middle|shift]\nDefault is left click",
|
"click" => Translations.cmd_inventory_help_click + usageStr + "/inventory <player|container|<id>> click <slot> [left|right|middle|shift|shiftright]\nDefault is left click",
|
||||||
"drop" => Translations.cmd_inventory_help_drop + usageStr + "/inventory <player|container|<id>> drop <slot> [all]\nAll means drop full stack",
|
"drop" => Translations.cmd_inventory_help_drop + usageStr + "/inventory <player|container|<id>> drop <slot> [all]\nAll means drop full stack",
|
||||||
"creativegive" => Translations.cmd_inventory_help_creativegive + usageStr + "/inventory creativegive <slot> <itemtype> <amount>",
|
"creativegive" => Translations.cmd_inventory_help_creativegive + usageStr + "/inventory creativegive <slot> <itemtype> <amount>",
|
||||||
"creativedelete" => Translations.cmd_inventory_help_creativedelete + usageStr + "/inventory creativedelete <slot>",
|
"creativedelete" => Translations.cmd_inventory_help_creativedelete + usageStr + "/inventory creativedelete <slot>",
|
||||||
|
|
@ -351,6 +351,7 @@ namespace MinecraftClient.Commands
|
||||||
WindowActionType.RightClick => Translations.cmd_inventory_right,
|
WindowActionType.RightClick => Translations.cmd_inventory_right,
|
||||||
WindowActionType.MiddleClick => Translations.cmd_inventory_middle,
|
WindowActionType.MiddleClick => Translations.cmd_inventory_middle,
|
||||||
WindowActionType.ShiftClick => Translations.cmd_inventory_shiftclick,
|
WindowActionType.ShiftClick => Translations.cmd_inventory_shiftclick,
|
||||||
|
WindowActionType.ShiftRightClick => Translations.cmd_inventory_shiftrightclick,
|
||||||
_ => "unknown",
|
_ => "unknown",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,11 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ShiftClick,
|
ShiftClick,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shift+Right click with mouse on a slot: send a whole item stack to the hotbar or other inventory. Differece from ShiftClick is how it reported to server
|
||||||
|
/// </summary>
|
||||||
|
ShiftRightClick,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Drop a single item on ground
|
/// Drop a single item on ground
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1582,6 +1582,7 @@ namespace MinecraftClient
|
||||||
changedSlots.Add(new Tuple<short, Item?>((short)slotId, null));
|
changedSlots.Add(new Tuple<short, Item?>((short)slotId, null));
|
||||||
break;
|
break;
|
||||||
case WindowActionType.ShiftClick:
|
case WindowActionType.ShiftClick:
|
||||||
|
case WindowActionType.ShiftRightClick:
|
||||||
if (slotId == 0) break;
|
if (slotId == 0) break;
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3723,6 +3723,11 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
mode = 1;
|
mode = 1;
|
||||||
item = new Item(ItemType.Null, 0, null);
|
item = new Item(ItemType.Null, 0, null);
|
||||||
break;
|
break;
|
||||||
|
case WindowActionType.ShiftRightClick: // Right-shift click uses button 1
|
||||||
|
button = 1;
|
||||||
|
mode = 1;
|
||||||
|
item = new Item(ItemType.Null, 0, null);
|
||||||
|
break;
|
||||||
case WindowActionType.DropItem:
|
case WindowActionType.DropItem:
|
||||||
button = 0;
|
button = 0;
|
||||||
mode = 4;
|
mode = 4;
|
||||||
|
|
@ -4199,4 +4204,4 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
return salt;
|
return salt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -2118,4 +2118,7 @@ Logging in...</value>
|
||||||
<data name="cmd.wait.random.min.bigger" xml:space="preserve">
|
<data name="cmd.wait.random.min.bigger" xml:space="preserve">
|
||||||
<value>Minimum number that you have provided is bigger than the maximum, swapping them around!</value>
|
<value>Minimum number that you have provided is bigger than the maximum, swapping them around!</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="cmd.inventory.shiftrightclick" xml:space="preserve">
|
||||||
|
<value>Shift right-clicking slot {0} in window #{1}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue