Skip to content

Commit 7127837

Browse files
author
ozelot379
committed
Merge branch 'develop' into 'master'
Develop See merge request minecraft/convert-minecraft-java-texture-to-bedrock/api!21
2 parents c185908 + ceedafb commit 7127837

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.gitlab-ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
npm_publish:
22
image: node:lts
3+
tags:
4+
- docker
5+
- npm
36
stage: deploy
47
script:
5-
- npm publish --access public --otp $NPM_OTP
8+
- npm publish --access public --otp "$(curl -s $OTP_URL)"
69
only:
710
- tags

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [4.0.5]
4+
- Set alpha to `2` in `OverlayToTranslateConverter`
5+
- Auto publish to npm
6+
37
## [4.0.4]
48
- Auto publish to npm
59

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@ozelot379/convert-minecraft-java-texture-to-bedrock-api",
33
"type": "module",
44
"productName": "ConvertJavaTextureToBedrockApi",
5-
"version": "4.0.4",
5+
"version": "4.0.5",
66
"description": "API for convert Minecraft Java texture packs to Bedrock texture packs",
77
"keywords": [
88
"Minecraft",
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/ozelot379/ConvertJavaTextureToBedrockApi#readme",
2525
"dependencies": {
26-
"@ozelot379/convert-base-api": "1.0.3",
26+
"@ozelot379/convert-base-api": "1.0.5",
2727
"uuid": "3.4.0"
2828
},
2929
"devDependencies": {},

src/converter/MetadataConverter.mjs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import {AbstractConverter} from "@ozelot379/convert-base-api";
22
import {DeleteConverter} from "./DeleteConverter.mjs";
33
import v4 from "uuid/v4.js";
44

5-
const {parse} = JSON;
6-
75
/**
86
* Class MetadataConverter
97
*/
@@ -40,7 +38,7 @@ class MetadataConverter extends AbstractConverter {
4038
uuid_module = v4();
4139
}
4240

43-
MetadataConverter.mcmeta = parse((await this.output.read(from)).toString("utf8").trim()); // trim it to supports UF8 files with 'BOOM' at the beginning
41+
MetadataConverter.mcmeta = JSON.parse((await this.output.read(from)).toString("utf8").trim()); // trim it to supports UF8 files with 'BOOM' at the beginning
4442

4543
if (MetadataConverter.mcmeta.pack.pack_format !== 4 && MetadataConverter.mcmeta.pack.pack_format !== 5 && MetadataConverter.mcmeta.pack.pack_format !== 6) {
4644
throw new Error("Only supports pack_format 4 (v1.13 or v1.14) or 5 (v1.15 or v1.16) or 6 (>= v1.16.2)!");

src/converter/OverlayToTranslateConverter.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class OverlayToTranslateConverter extends AbstractConverter {
2828
image.bitmap.data[idx] = image_overlay.bitmap.data[idx];
2929
image.bitmap.data[idx + 1] = image_overlay.bitmap.data[idx + 1];
3030
image.bitmap.data[idx + 2] = image_overlay.bitmap.data[idx + 2];
31-
image.bitmap.data[idx + 3] = Math.min(1, image_overlay.bitmap.data[idx + 3]);
31+
image.bitmap.data[idx + 3] = 2;
3232
}
3333
});
3434

0 commit comments

Comments
 (0)