Skip to content

Commit b0cec3d

Browse files
committed
Transparent Texture Export Fix
- Fixed the transparent texture causing a crash when using advanced resource pack settings. (https://discord.com/channels/785339959518953482/1253070267719352450)
1 parent f37a70c commit b0cec3d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/systems/resourcepackCompiler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,15 @@ export function compileResourcePack(options: {
218218
optifineEmissive
219219
)
220220
}
221+
221222
// Transparent texture
223+
const transparentTexturePath = PathModule.join(
224+
resourcePackFolder,
225+
'assets/animated_java/textures/transparent.png'
226+
)
227+
fs.mkdirSync(PathModule.dirname(transparentTexturePath), { recursive: true })
222228
fs.writeFileSync(
223-
PathModule.join(resourcePackFolder, 'assets/animated_java/textures/transparent.png'),
229+
transparentTexturePath,
224230
nativeImage.createFromDataURL(TRANSPARENT_TEXTURE.source).toPNG(),
225231
'base64'
226232
)

0 commit comments

Comments
 (0)