File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/systems/resourcepackCompiler Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ const compileResourcePack: ResourcePackCompiler = async ({
131131 coreFiles,
132132 versionedFiles,
133133 rig,
134+ resourcePackPath,
134135 displayItemPath,
135136 textureExportFolder,
136137 modelExportFolder,
@@ -150,9 +151,10 @@ const compileResourcePack: ResourcePackCompiler = async ({
150151
151152 // Display Item
152153 const displayItemModel = new PredicateItemModel ( )
153- if ( fs . existsSync ( displayItemPath ) ) {
154+ const absoluteDisplayItemPath = PathModule . join ( resourcePackPath , displayItemPath )
155+ if ( fs . existsSync ( absoluteDisplayItemPath ) ) {
154156 console . warn ( 'Display item already exists! Attempting to merge...' )
155- displayItemModel . readExisting ( displayItemPath )
157+ displayItemModel . readExisting ( absoluteDisplayItemPath )
156158 }
157159
158160 displayItemModel . lastOverrideId = Math . max (
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ interface ResourcePackCompilerOptions {
2727 coreFiles : Map < string , ExportedFile >
2828 versionedFiles : Map < string , ExportedFile >
2929 rig : IRenderedRig
30+ resourcePackPath : string
3031 displayItemPath : string
3132 textureExportFolder : string
3233 modelExportFolder : string
@@ -81,6 +82,7 @@ export default async function compileResourcePack(
8182 // Move paths into versioned overlay folders.
8283 await VERSIONED_RESOURCE_PACK_COMPILERS [ version ] ( {
8384 ...options ,
85+ resourcePackPath : versionedResourcePackFolder ,
8486 ajmeta,
8587 coreFiles,
8688 versionedFiles,
You can’t perform that action at this time.
0 commit comments