init
This commit is contained in:
+74
@@ -0,0 +1,74 @@
|
|||||||
|
Console.Write("Block Name(diamon_ore): ");
|
||||||
|
string blockname = Console.ReadLine();
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(blockname))
|
||||||
|
{
|
||||||
|
blockname = "diamond_ore";
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.Write("top texture url: ");
|
||||||
|
string top_texture = Console.ReadLine().Trim('\"');
|
||||||
|
|
||||||
|
Console.Write("bottom texture url: ");
|
||||||
|
string bottom_texture = Console.ReadLine().Trim('\"');
|
||||||
|
|
||||||
|
Console.Write("both texture url: ");
|
||||||
|
string both_texture = Console.ReadLine().Trim('\"');
|
||||||
|
|
||||||
|
Console.Write("none texture url: ");
|
||||||
|
string none_texture = Console.ReadLine().Trim('\"');
|
||||||
|
|
||||||
|
|
||||||
|
string working_dir = Directory.GetCurrentDirectory();
|
||||||
|
// string blockname = "blockname";
|
||||||
|
Directory.CreateDirectory(working_dir + "/output/assets");
|
||||||
|
|
||||||
|
string mcmeta = @"{
|
||||||
|
""pack"": {
|
||||||
|
""description"": """",
|
||||||
|
""pack_format"": 15,
|
||||||
|
""min_format"": [15, 0],
|
||||||
|
""max_format"": [1000, 0],
|
||||||
|
""supported_formats"": [15, 1000]
|
||||||
|
}
|
||||||
|
}";
|
||||||
|
|
||||||
|
File.WriteAllText(working_dir + "/output/pack.mcmeta", mcmeta);
|
||||||
|
|
||||||
|
Directory.CreateDirectory(working_dir + "/output/assets/minecraft");
|
||||||
|
Directory.CreateDirectory(working_dir + "/output/assets/minecraft/optifine");
|
||||||
|
Directory.CreateDirectory(working_dir + "/output/assets/minecraft/optifine/ctm");
|
||||||
|
Directory.CreateDirectory(working_dir + "/output/assets/minecraft/optifine/ctm/" + blockname);
|
||||||
|
|
||||||
|
|
||||||
|
string ctm_dir = working_dir + "/output/assets/minecraft/optifine/ctm/" + blockname;
|
||||||
|
string ctmproperties = @"matchTiles=" + blockname + @"
|
||||||
|
method=ctm
|
||||||
|
tiles=0-47";
|
||||||
|
|
||||||
|
File.WriteAllText(ctm_dir + "/" + blockname + ".properties", ctmproperties);
|
||||||
|
|
||||||
|
int[] top = {4,5,7,12,13,14,15,29,31};
|
||||||
|
int[] bottom = {16,17,18,36,37,38,39,40,42};
|
||||||
|
int[] both = {0,1,2,3};
|
||||||
|
int[] none = {6,8,9,10,11,19,20,21,22,23,24,25,26,27,28,30,32,33,34,35,41,43,44,45,46};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach (int i in top)
|
||||||
|
{
|
||||||
|
File.Copy(top_texture, ctm_dir + "/" + i + ".png");
|
||||||
|
}
|
||||||
|
foreach (int i in bottom)
|
||||||
|
{
|
||||||
|
File.Copy(bottom_texture, ctm_dir + "/" + i + ".png");
|
||||||
|
}
|
||||||
|
foreach (int i in both)
|
||||||
|
{
|
||||||
|
File.Copy(both_texture, ctm_dir + "/" + i + ".png");
|
||||||
|
}
|
||||||
|
foreach (int i in none)
|
||||||
|
{
|
||||||
|
File.Copy(none_texture, ctm_dir + "/" + i + ".png");
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 733 B |
Binary file not shown.
|
After Width: | Height: | Size: 701 B |
Binary file not shown.
|
After Width: | Height: | Size: 624 B |
Binary file not shown.
|
After Width: | Height: | Size: 665 B |
@@ -0,0 +1,11 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user