auto coplete added
This commit is contained in:
+23
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user