Skip to content

Commit

Permalink
f -> model
Browse files Browse the repository at this point in the history
  • Loading branch information
aidant19 committed Jan 11, 2024
1 parent 2e52c93 commit 6b67a86
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/ajexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ const exportNextFile = () => {
exportNextFile();

function injectModelPackPaths(modelContent, paths) {
const f = JSON.parse(modelContent);
f.animated_java.settings.resource_pack_mcmeta = paths.resourcePackPath;
f.animated_java.exporter_settings[
const model = JSON.parse(modelContent);
model.animated_java.settings.resource_pack_mcmeta = paths.resourcePackPath;
model.animated_java.exporter_settings[
'animated_java:datapack_exporter'
].datapack_mcmeta = paths.dataPackPath;
for (const texture of f.textures) {
for (const texture of model.textures) {
texture.path = texture.path.replaceAll('\\', '/');
if (texture.path.includes('.minecraft')) {
const x = texture.path.split('assets')[1];
Expand All @@ -62,7 +62,7 @@ function injectModelPackPaths(modelContent, paths) {
texture.path = newPath;
}
}
return JSON.stringify(f);
return JSON.stringify(model);
}

function getConfigPaths(configFile) {
Expand Down

0 comments on commit 6b67a86

Please sign in to comment.