Fix pack.mcmeta for pre-1.13 versions
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"description": "ReplayMod resources",
|
"description": "ReplayMod resources",
|
||||||
|
//#if MC>=11300
|
||||||
"pack_format": 4
|
"pack_format": 4
|
||||||
|
//#else
|
||||||
|
//#if MC>=11002
|
||||||
|
//$$ "pack_format": 2
|
||||||
|
//#else
|
||||||
|
//$$ "pack_format": 1
|
||||||
|
//#endif
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,13 @@ static def convertFile(Map<String, String> kws, Map<String, Integer> vars, File
|
|||||||
project.ext.convertTree = { Map<String, Integer> vars, String inName, String outName=inName ->
|
project.ext.convertTree = { Map<String, Integer> vars, String inName, String outName=inName ->
|
||||||
def defaultKws = [if: '//#if ', ifdef: '//#ifdef ', else: '//#else', endif: '//#endif', eval: '//$$']
|
def defaultKws = [if: '//#if ', ifdef: '//#ifdef ', else: '//#else', endif: '//#endif', eval: '//$$']
|
||||||
def cfgKws = [if: '##if ', ifdef: '##ifdef ', else: '##else', endif: '##endif', eval: '#$$']
|
def cfgKws = [if: '##if ', ifdef: '##ifdef ', else: '##else', endif: '##endif', eval: '#$$']
|
||||||
def extensions = ['.java': defaultKws, '.gradle': defaultKws, '.json': defaultKws, '.cfg': cfgKws]
|
def extensions = [
|
||||||
|
'.java': defaultKws,
|
||||||
|
'.gradle': defaultKws,
|
||||||
|
'.json': defaultKws,
|
||||||
|
'.mcmeta': defaultKws,
|
||||||
|
'.cfg': cfgKws
|
||||||
|
]
|
||||||
def inPath = project.file(inName).toPath()
|
def inPath = project.file(inName).toPath()
|
||||||
def outPath = project.file(outName).toPath()
|
def outPath = project.file(outName).toPath()
|
||||||
def inPlace = inPath.toAbsolutePath().equals(outPath.toAbsolutePath())
|
def inPlace = inPath.toAbsolutePath().equals(outPath.toAbsolutePath())
|
||||||
|
|||||||
Reference in New Issue
Block a user