File constructor
File(})
The file class simply generates a new mcfunction file with content and a path.
The File class can be used as often as you want and where you want, so you can also define a new file in a For container for example.
File(
path:"main",
child: File.execute( // same as execute: true
path: 'new'
child: Command(...)
)
)
Implementation
File(
this.path, {
this.child,
this.execute = false,
this.pack,
this.create = true,
this.inheritFolder = true,
this.header,
}) {
path.replaceAll('.mcfunction', '');
if (path.substring(0, 1) == '/') path = path.substring(1);
}