add 1.18 support

This commit is contained in:
chmodsayshello 2022-01-03 11:37:40 +00:00
parent 4e2fa3b854
commit 68483ff7ee
1 changed files with 19 additions and 1 deletions

View File

@ -99,6 +99,24 @@ For the full help, use:
tex_dir = base_dir + "/assets/minecraft/textures"
print(
"""What is the Minecraft Version the resource pack is intended for
1: 1.12 and below
2: 1.13 and above
""")
version = input("Please enter 1 or 2: ")
Conversion_Table = ""
if version != "1" and version != "2":
print("Invalid Input, please restart the script and enter 1 or 2!")
sys.exit(2)
else:
if version == "1":
Conversion_Table = "Conversion_Table_112.csv"
else:
Conversion_Table = "Conversion_Table_118.csv"
# Get texture pack name (from directory name)
bdir_split = base_dir.split("/")
output_dir_name = bdir_split[-1]
@ -128,7 +146,7 @@ def target_dir(directory):
def convert_textures():
failed_conversions = 0
print("Texture conversion BEGINS NOW!")
with open("Conversion_Table.csv", newline="") as csvfile:
with open(Conversion_Table, newline="") as csvfile:
reader = csv.reader(csvfile, delimiter=",", quotechar='"')
first_row = True
for row in reader: