-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #13 More functions to come in the future for #7 #8 #10 #11 structure built for these in the future
- Loading branch information
Showing
7 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import os | ||
import getpass | ||
|
||
def FUN(): | ||
|
||
funconfig = open("C:/Users/" + getpass.getuser() + "/AppData/Roaming/Totems+/funconfig.txt", "r") | ||
funconfigread = funconfig.readlines() | ||
funconfig.close() | ||
|
||
worldLocation = funconfigread[0] | ||
nameList = funconfigread[1] | ||
|
||
worldLocation = worldLocation.replace('\n','') | ||
nameList = nameList.split(';') | ||
|
||
print(nameList) | ||
|
||
os.mkdir(worldLocation + "/datapacks/Totems+ CMD/data/totemsplus") | ||
os.mkdir(worldLocation + "/datapacks/Totems+ CMD/data/totemsplus/functions") | ||
|
||
mcfunction = open(worldLocation + '/datapacks/Totems+ CMD/data/totemsplus/functions/totemload.mcfunction', 'x') | ||
mcfunction.close() | ||
|
||
mcfunction = open(worldLocation + '/datapacks/Totems+ CMD/data/totemsplus/functions/totemload.mcfunction', 'a') | ||
|
||
counter = 0 | ||
|
||
while len(nameList) != counter + 1: | ||
|
||
mcfunction.write('give @s minecraft:totem_of_undying{CustomModelData:' + str(910340 + counter) +'} 1\n') | ||
|
||
counter += 1 | ||
|
||
mcfunction.close() | ||
|
||
counter = 0 | ||
|
||
while len(nameList) != counter + 1: | ||
|
||
mcfunction = open(worldLocation + '/datapacks/Totems+ CMD/data/totemsplus/functions/summon' + nameList[counter] + '.mcfunction', 'x') | ||
mcfunction.close() | ||
|
||
mcfunction = open(worldLocation + '/datapacks/Totems+ CMD/data/totemsplus/functions/summon' + nameList[counter] + '.mcfunction', 'a') | ||
|
||
mcfunction.write('give @s minecraft:totem_of_undying{CustomModelData:' + str(910340 + counter) +'} 1\n') | ||
mcfunction.close() | ||
|
||
counter += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.