auto coplete added

This commit is contained in:
Kq
2026-08-07 20:13:27 +02:00
parent b63e038a40
commit 8f4bf0bd90
2 changed files with 367 additions and 3 deletions
+23 -3
View File
@@ -8,14 +8,34 @@ namespace txtgen;
public class Program
{
// string blockname;
static string ctm_dir;
static void Main()
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.CursorVisible = true;
Console.Write("Block Name(diamon_ore): ");
string blockname = Console.ReadLine();
// Dedupe, sort alphabetically once for consistent display
var blocks = AutoComplete.FullBlocks.Distinct().OrderBy(b => b).ToList();
Console.WriteLine("Minecraft 26.2 (Chaos Cubed) — Full Block Picker");
// Console.WriteLine("Type to filter, Up/Down to move, Tab/Enter to accept, Esc to cancel.");
Console.WriteLine();
string chosen = AutoComplete.AutoCompletePrompt("Block Name: ", blocks);
Console.WriteLine();
if (chosen == null)
return;
// else
// Console.WriteLine($"You selected: {chosen}");
// Console.Write("Block Name(diamon_ore): ");
string blockname = chosen;
if (string.IsNullOrEmpty(blockname))
{
@@ -24,7 +44,7 @@ public class Program
if (Directory.Exists("output/assets/minecraft/optifine/ctm/" + blockname))
{
Console.WriteLine("that block already exists, delete it and try again");
Console.WriteLine("this block already exists in the texturepack delete it and try again");
return;
}
Create_pack(blockname);