@@ -100,18 +100,18 @@ object DatapackCreator {
100
100
if (f is Native ) {
101
101
return @run
102
102
}
103
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ ${f.nameWithNamespace} .mcfunction" )
104
- Files .createDirectories(Paths .get(" $currPath /functions " ))
103
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ ${f.nameWithNamespace} .mcfunction" )
104
+ Files .createDirectories(Paths .get(" $currPath /function " ))
105
105
Files .write(
106
- Paths .get(" $currPath /functions /${f.nameWithNamespace} .mcfunction" ),
106
+ Paths .get(" $currPath /function /${f.nameWithNamespace} .mcfunction" ),
107
107
f.cmdStr.toByteArray()
108
108
)
109
109
if (f.compiledFunctions.isNotEmpty()){
110
110
for (cf in f.compiledFunctions.values){
111
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ ${cf.nameWithNamespace} .mcfunction" )
112
- Files .createDirectories(Paths .get(" $currPath /functions " ))
111
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ ${cf.nameWithNamespace} .mcfunction" )
112
+ Files .createDirectories(Paths .get(" $currPath /function " ))
113
113
Files .write(
114
- Paths .get(" $currPath /functions /${cf.nameWithNamespace} .mcfunction" ),
114
+ Paths .get(" $currPath /function /${cf.nameWithNamespace} .mcfunction" ),
115
115
cf.cmdStr.toByteArray()
116
116
)
117
117
}
@@ -127,42 +127,42 @@ object DatapackCreator {
127
127
if (f is Native ) {
128
128
return @run
129
129
}
130
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + f.nameWithNamespace + " .mcfunction" )
130
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + f.nameWithNamespace + " .mcfunction" )
131
131
// TODO 可能无法正确创建文件夹
132
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(cls.identifier)))
132
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(cls.identifier)))
133
133
if (f is ExtensionFunction ){
134
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(cls.identifier) + " /ex" ))
134
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(cls.identifier) + " /ex" ))
135
135
}
136
136
Files .write(
137
- Paths .get(" $currPath /functions /" + f.nameWithNamespace + " .mcfunction" ),
137
+ Paths .get(" $currPath /function /" + f.nameWithNamespace + " .mcfunction" ),
138
138
f.cmdStr.toByteArray()
139
139
)
140
140
if (f.compiledFunctions.isNotEmpty()){
141
141
for (cf in f.compiledFunctions.values) {
142
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + cf.nameWithNamespace + " .mcfunction" )
142
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + cf.nameWithNamespace + " .mcfunction" )
143
143
// TODO 可能无法正确创建文件夹
144
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(cls.identifier)))
145
- Files .write(Paths .get(" $currPath /functions /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
144
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(cls.identifier)))
145
+ Files .write(Paths .get(" $currPath /function /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
146
146
}
147
147
}
148
148
}
149
149
}
150
150
// 构造函数
151
151
cls.constructors.forEach{ c ->
152
152
run {
153
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + c.nameWithNamespace + " .mcfunction" )
153
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + c.nameWithNamespace + " .mcfunction" )
154
154
// TODO 可能无法正确创建文件夹
155
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(cls.identifier)))
155
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(cls.identifier)))
156
156
Files .write(
157
- Paths .get(" $currPath /functions /" + c.nameWithNamespace + " .mcfunction" ),
157
+ Paths .get(" $currPath /function /" + c.nameWithNamespace + " .mcfunction" ),
158
158
c.cmdStr.toByteArray()
159
159
)
160
160
if (c.compiledFunctions.isNotEmpty()){
161
161
for (cf in c.compiledFunctions.values) {
162
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + cf.nameWithNamespace + " .mcfunction" )
162
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + cf.nameWithNamespace + " .mcfunction" )
163
163
// TODO 可能无法正确创建文件夹
164
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(cls.identifier)))
165
- Files .write(Paths .get(" $currPath /functions /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
164
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(cls.identifier)))
165
+ Files .write(Paths .get(" $currPath /function /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
166
166
}
167
167
}
168
168
}
@@ -178,22 +178,22 @@ object DatapackCreator {
178
178
if (f is Native ) {
179
179
return @run
180
180
}
181
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + f.nameWithNamespace + " .mcfunction" )
181
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + f.nameWithNamespace + " .mcfunction" )
182
182
// TODO 可能无法正确创建文件夹
183
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(t.identifier)))
183
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(t.identifier)))
184
184
if (f is ExtensionFunction ){
185
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(t.identifier) + " /ex" ))
185
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(t.identifier) + " /ex" ))
186
186
}
187
187
Files .write(
188
- Paths .get(" $currPath /functions /" + f.nameWithNamespace + " .mcfunction" ),
188
+ Paths .get(" $currPath /function /" + f.nameWithNamespace + " .mcfunction" ),
189
189
f.cmdStr.toByteArray()
190
190
)
191
191
if (f.compiledFunctions.isNotEmpty()){
192
192
for (cf in f.compiledFunctions.values) {
193
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + cf.nameWithNamespace + " .mcfunction" )
193
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + cf.nameWithNamespace + " .mcfunction" )
194
194
// TODO 可能无法正确创建文件夹
195
- Files .createDirectories(Paths .get(" $currPath /functions /" + StringHelper .toLowerCase(t.identifier)))
196
- Files .write(Paths .get(" $currPath /functions /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
195
+ Files .createDirectories(Paths .get(" $currPath /function /" + StringHelper .toLowerCase(t.identifier)))
196
+ Files .write(Paths .get(" $currPath /function /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
197
197
}
198
198
}
199
199
}
@@ -208,22 +208,22 @@ object DatapackCreator {
208
208
if (f is Native ) {
209
209
return @run
210
210
}
211
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + f.nameWithNamespace + " .mcfunction" )
211
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + f.nameWithNamespace + " .mcfunction" )
212
212
// TODO 可能无法正确创建文件夹
213
- Files .createDirectories(Paths .get(" $currPath \\ functions \\ " + StringHelper .toLowerCase(obj.identifier) + " \\ static" ))
213
+ Files .createDirectories(Paths .get(" $currPath \\ function \\ " + StringHelper .toLowerCase(obj.identifier) + " \\ static" ))
214
214
if (f is ExtensionFunction ){
215
- Files .createDirectories(Paths .get(" $currPath \\ functions \\ " + StringHelper .toLowerCase(obj.identifier) + " \\ static\\ ex" ))
215
+ Files .createDirectories(Paths .get(" $currPath \\ function \\ " + StringHelper .toLowerCase(obj.identifier) + " \\ static\\ ex" ))
216
216
}
217
217
Files .write(
218
- Paths .get(" $currPath /functions /" + f.nameWithNamespace + " .mcfunction" ),
218
+ Paths .get(" $currPath /function /" + f.nameWithNamespace + " .mcfunction" ),
219
219
f.cmdStr.toByteArray()
220
220
)
221
221
if (f.compiledFunctions.isNotEmpty()){
222
222
for (cf in f.compiledFunctions.values) {
223
- LogProcessor .debug(" Writing File: $currPath \\ functions \\ " + cf.nameWithNamespace + " .mcfunction" )
223
+ LogProcessor .debug(" Writing File: $currPath \\ function \\ " + cf.nameWithNamespace + " .mcfunction" )
224
224
// TODO 可能无法正确创建文件夹
225
- Files .createDirectories(Paths .get(" $currPath \\ functions /" + StringHelper .toLowerCase(obj.identifier)))
226
- Files .write(Paths .get(" $currPath /functions /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
225
+ Files .createDirectories(Paths .get(" $currPath \\ function /" + StringHelper .toLowerCase(obj.identifier)))
226
+ Files .write(Paths .get(" $currPath /function /" + cf.nameWithNamespace + " .mcfunction" ), cf.cmdStr.toByteArray())
227
227
}
228
228
}
229
229
}
0 commit comments