Added ASCII Art for Furnace/Smoker/Blast Furnace, Hopper/Minecart, Shulker, Grindstone. Added a command for list of available inventories. Added SmithingTable inventory type.

This commit is contained in:
Milutinke 2022-09-22 21:58:51 +02:00
parent a03bab277b
commit 55057b3157
9 changed files with 188 additions and 49 deletions

View file

@ -82,6 +82,18 @@ namespace MinecraftClient.Commands
else
return Translations.Get("cmd.inventory.container_not_found");
}
else if (args[0].ToLower().StartsWith("list") || args[0].ToLower().StartsWith("l"))
{
Dictionary<int, Container> inventories = handler.GetInventories();
List<int> availableIds = inventories.Keys.ToList();
StringBuilder response = new();
response.Append(Translations.Get("cmd.inventory.inventories_available") + ":\n");
foreach (int id in availableIds)
response.AppendLine(String.Format(" #{0} - {1}§8", id, inventories[id].Title));
return response.ToString();
}
else if (args[0].ToLower() == "help")
{
if (args.Length >= 2)

View file

@ -8,7 +8,8 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace MinecraftClient {
namespace MinecraftClient
{
using System;
@ -22,23 +23,28 @@ namespace MinecraftClient {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class DefaultConfigResource {
public class DefaultConfigResource
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal DefaultConfigResource() {
internal DefaultConfigResource()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
public static global::System.Resources.ResourceManager ResourceManager
{
get
{
if (object.ReferenceEquals(resourceMan, null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MinecraftClient.DefaultConfigResource", typeof(DefaultConfigResource).Assembly);
resourceMan = temp;
}
@ -51,11 +57,14 @@ namespace MinecraftClient {
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
public static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set {
set
{
resourceCulture = value;
}
}
@ -75,8 +84,10 @@ namespace MinecraftClient {
///║║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║10 ║11 ║12 ║13 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_BrewingStand {
get {
public static string ContainerType_BrewingStand
{
get
{
return ResourceManager.GetString("ContainerType_BrewingStand", resourceCulture);
}
}
@ -96,12 +107,22 @@ namespace MinecraftClient {
///║║10 ║11 ║12 ║13 ║14 ║15 ║16 ║17 ║18 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_Crafting {
get {
public static string ContainerType_Crafting
{
get
{
return ResourceManager.GetString("ContainerType_Crafting", resourceCulture);
}
}
public static string ContainerType_Furnace
{
get
{
return ResourceManager.GetString("ContainerType_Furnace", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ╔═════════════════════════════════════╗
///║ Container ║
@ -117,8 +138,10 @@ namespace MinecraftClient {
///║║ 9 ║10 ║11 ║12 ║13 ║14 ║15 ║16 ║17 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_Generic_3x3 {
get {
public static string ContainerType_Generic_3x3
{
get
{
return ResourceManager.GetString("ContainerType_Generic_3x3", resourceCulture);
}
}
@ -138,8 +161,10 @@ namespace MinecraftClient {
///║║27 ║28 ║29 ║30 ║31 ║32 ║33 ║34 ║35 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_Generic_9x3 {
get {
public static string ContainerType_Generic_9x3
{
get
{
return ResourceManager.GetString("ContainerType_Generic_9x3", resourceCulture);
}
}
@ -159,12 +184,30 @@ namespace MinecraftClient {
///║║36 ║37 ║38 ║39 ║40 ║41 ║42 ║43 ║44 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_Generic_9x6 {
get {
public static string ContainerType_Generic_9x6
{
get
{
return ResourceManager.GetString("ContainerType_Generic_9x6", resourceCulture);
}
}
public static string ContainerType_Grindstone
{
get
{
return ResourceManager.GetString("ContainerType_Grindstone", resourceCulture);
}
}
public static string ContainerType_Hopper
{
get
{
return ResourceManager.GetString("ContainerType_Hopper", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ╔═════════════════════════════════════╗
///║╔═══╦═══════════╗ ║
@ -180,8 +223,10 @@ namespace MinecraftClient {
///║║ 9 ║10 ║11 ║12 ║13 ║14 ║15 ║16 ║17 ║║
///║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬══ [rest of string was truncated]&quot;;.
/// </summary>
public static string ContainerType_PlayerInventory {
get {
public static string ContainerType_PlayerInventory
{
get
{
return ResourceManager.GetString("ContainerType_PlayerInventory", resourceCulture);
}
}
@ -208,8 +253,10 @@ namespace MinecraftClient {
///internalcmdchar=slash # Use &apos;none&apos;, &apos;slash&apos; or &apos;backslash&apos;
///messagec [rest of string was truncated]&quot;;.
/// </summary>
public static string MinecraftClient {
get {
public static string MinecraftClient
{
get
{
return ResourceManager.GetString("MinecraftClient", resourceCulture);
}
}
@ -229,8 +276,10 @@ namespace MinecraftClient {
///mcc.ip=Server IP :
///mcc.use_version=§8Using Minecraft version [rest of string was truncated]&quot;;.
/// </summary>
public static string TranslationEnglish {
get {
public static string TranslationEnglish
{
get
{
return ResourceManager.GetString("TranslationEnglish", resourceCulture);
}
}

View file

@ -124,6 +124,9 @@
<data name="ContainerType_Crafting" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Crafting.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ContainerType_Furnace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Furnace.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ContainerType_Generic_3x3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Generic_3x3.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
@ -133,6 +136,12 @@
<data name="ContainerType_Generic_9x6" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Generic_9x6.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ContainerType_Grindstone" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Grindstone.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ContainerType_Hopper" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.Hopper.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ContainerType_PlayerInventory" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\containers\ContainerType.PlayerInventory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>

View file

@ -28,6 +28,7 @@ namespace MinecraftClient.Inventory
Loom,
Merchant,
ShulkerBox,
SmightingTable,
Smoker,
Cartography,
Stonecutter,

View file

@ -55,21 +55,21 @@ namespace MinecraftClient.Inventory
case ContainerType.Generic_9x6: return DefaultConfigResource.ContainerType_Generic_9x6;
case ContainerType.Generic_3x3: return DefaultConfigResource.ContainerType_Generic_3x3;
case ContainerType.Crafting: return DefaultConfigResource.ContainerType_Crafting;
case ContainerType.BlastFurnace: return null;
case ContainerType.Furnace: return null;
case ContainerType.Smoker: return null;
case ContainerType.BlastFurnace: return DefaultConfigResource.ContainerType_Furnace;
case ContainerType.Furnace: return DefaultConfigResource.ContainerType_Furnace;
case ContainerType.Smoker: return DefaultConfigResource.ContainerType_Furnace;
case ContainerType.Enchantment: return null;
case ContainerType.BrewingStand: return DefaultConfigResource.ContainerType_BrewingStand;
case ContainerType.Merchant: return null;
case ContainerType.Beacon: return null;
case ContainerType.Anvil: return null;
case ContainerType.Hopper: return null;
case ContainerType.ShulkerBox: return null;
case ContainerType.Hopper: return DefaultConfigResource.ContainerType_Hopper;
case ContainerType.ShulkerBox: return DefaultConfigResource.ContainerType_Generic_9x3;
case ContainerType.Loom: return null;
case ContainerType.Stonecutter: return null;
case ContainerType.Lectern: return null;
case ContainerType.Cartography: return null;
case ContainerType.Grindstone: return null;
case ContainerType.Grindstone: return DefaultConfigResource.ContainerType_Grindstone;
case ContainerType.Unknown: return null;
default: return null;
}

View file

@ -0,0 +1,23 @@
╔═════════════════════════════════════╗
║ Container ║
║ ╔═══╗ ║
║ ║ 0 ║ ║
║ ╚═══╝ ╔═══╗ ║
║ ⠂⡠⢂ ━━▶ ║ 2 ║ ║
║ ⠂⡠⢂ ╚═══╝ ║
║ ╔═══╗ ║
║ ║ 1 ║ ║
║ ╚═══╝ ║
║ Inventory ║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║ 3 ║ 4 ║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║10 ║11 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║12 ║13 ║14 ║15 ║16 ║17 ║18 ║19 ║20 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║21 ║22 ║23 ║24 ║25 ║26 ║27 ║38 ║29 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║30 ║31 ║32 ║33 ║34 ║35 ║36 ║37 ║38 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║ 1 2 3 4 5 6 7 8 9 ║
╚═════════════════════════════════════╝

View file

@ -0,0 +1,26 @@
╔═════════════════════════════════════╗
║ Repair & Disenchant ║
║ ╔═════════╗ ║
║ ║ ╔═══╗ ║ ║
║ ╔══║ ║ 0 ║ ║══╗ ║
║ ║ ║ ╚═══╝ ║ ║ ║
║ ║ ║ ╔═══╗ ║ ║ ╔═══╗ ║
║ ║ ║ ║ 1 ║ ║ ║ ━━▶ ║ 2 ║ ║
║ ║ ║ ╚═══╝ ║ ║ ╚═══╝ ║
║ ║ ╠═════════╣ ║ ║
║ ║ ║ ║ ║ ║
║ ╚══╝ ╚══╝ ║
║ ║
║ Inventory ║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║ 3 ║ 4 ║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║10 ║11 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║12 ║13 ║14 ║15 ║16 ║17 ║18 ║19 ║20 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║21 ║22 ║23 ║24 ║25 ║26 ║27 ║38 ║29 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║30 ║31 ║32 ║33 ║34 ║35 ║36 ║37 ║38 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║ 1 2 3 4 5 6 7 8 9 ║
╚═════════════════════════════════════╝

View file

@ -0,0 +1,18 @@
╔═════════════════════════════════════╗
║ Container ║
║ ╔═══╦═══╦═══╦═══╦═══╗ ║
║ ║ 0 ║ 1 ║ 2 ║ 3 ║ 4 ║ ║
║ ╚═══╩═══╩═══╩═══╩═══╝ ║
║ Inventory ║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║10 ║11 ║12 ║13 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║14 ║15 ║16 ║17 ║18 ║19 ║20 ║21 ║22 ║║
║╠═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╬═══╣║
║║23 ║24 ║25 ║26 ║27 ║28 ║29 ║30 ║31 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║╔═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╦═══╗║
║║32 ║33 ║34 ║35 ║36 ║37 ║38 ║39 ║40 ║║
║╚═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╩═══╝║
║ 1 2 3 4 5 6 7 8 9 ║
╚═════════════════════════════════════╝

View file

@ -305,6 +305,7 @@ cmd.inventory.close_fail=Failed to close Inventory #{0}
cmd.inventory.not_exist=Inventory #{0} do not exist
cmd.inventory.inventory=Inventory
cmd.inventory.inventories=Inventories
cmd.inventory.inventories_available=Available Inventories
cmd.inventory.hotbar=Your selected hotbar is {0}
cmd.inventory.damage=Damage
cmd.inventory.left=Left