Skip to content

Commit c320d87

Browse files
committed
Added liquid data
1 parent 18fc25b commit c320d87

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

.saved/data/liquids.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace,name
2+
minecraft,water
3+
minecraft,flowing_water
4+
minecraft,lava
5+
minecraft,flowing_lava

.saved/tags/functions/functions.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minecraft:lava
2+
minecraft:flowing_lava
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minecraft:water
2+
minecraft:flowing_water

__pycache__/tags.cpython-38.pyc

191 Bytes
Binary file not shown.

tags.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,26 @@ def getOption(options,x):
6767
workingList.extend(genTag(f"{argString[1:]}.mctag", packName, packId))
6868
print(f'continuing to load "{file}"')
6969
else:
70-
with open(f".saved/tags/{t}/{argString[1:]}.txt", "r") as data:
71-
for i in data:
72-
for i2 in i.split(","):
73-
i2 = i2.strip()
74-
if not ":" in i2:
75-
workingList.append("minecraft:" + i2)
76-
else:
77-
workingList.append(i2)
70+
def getEntries(path):
71+
result = []
72+
with open(f".saved/tags/{t}/{path}.txt", "r") as data:
73+
for i in data:
74+
for i2 in i.split(","):
75+
i2 = i2.strip()
76+
if i2[0] == "#":
77+
if not ":" in i2:
78+
workingList.extend(getEntries(f"minecraft:{i2[1:]}"))
79+
else:
80+
workingList.extend(getEntries(i2[1:]))
81+
else:
82+
if not ":" in i2:
83+
result.append("minecraft:" + i2)
84+
else:
85+
result.append(i2)
86+
87+
return result
88+
89+
workingList.extend(getEntries(argString[1:]))
7890
elif os.path.exists(f".saved/tags/{t}/{argString[1:]}.txt"):
7991
def getEntries(path):
8092
result = []

0 commit comments

Comments
 (0)