Skip to content

Commit 48e46e0

Browse files
author
ozelot379
committed
Merge branch 'develop' into 'master'
v2.0.0 See merge request minecraft/ConvertJavaTextureToBedrock!15
2 parents b6080de + d9faf2d commit 48e46e0

75 files changed

Lines changed: 5842 additions & 4948 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.idea
22
dist
3-
/input
43
node_modules
5-
/output
64
*.log

‎.npmignore‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
.idea
2-
dist/webapp
3-
input
4-
node_modules
5-
output
6-
src
7-
tmp
8-
webpack.config.cli.js
9-
webpack.config.webapp.js
10-
*.log
1+
*
2+
!dist
3+
dist/*
4+
!dist/webapp
5+
!CHANGELOG.md
6+
!package.json
7+
!README.md
8+
!yarn.lock

‎CHANGELOG.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [2.0.0]
4+
- Support java v1.15 and bedrock v1.14
5+
- Convert hotbar, bars, buttons and tabs ui and inventory icons
6+
- Possible bugs fixed in:
7+
- Fix arrow entity
8+
- Fix bed feeds
9+
- Fix chest item
10+
- Fix fireworks entity
11+
- Fix fishing hook entity
12+
- Fix lava block
13+
- Fix opaque leaves block
14+
- Fix piston arm entity
15+
- Fix redstone dust block
16+
- Fix title image
17+
318
## [1.13.5]
419
- Fixes
520

‎README.md‎

Lines changed: 49 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
THIS PROJECT IS NO OFFICIAL [MINECRAFT](https://minecraft.net/) PRODUCT - NOT AUTHORIZED OR ASSOCIATED BY [MOJANG](https://mojang.com/)
1+
THIS PROJECT IS NO OFFICIAL MINECRAFT] PRODUCT - NOT AUTHORIZED OR ASSOCIATED BY MOJANG
22

33
---
44

5-
# Convert Minecraft Java texture packs to Minecraft Bedrock texture packs
5+
# Convert Minecraft Java texture packs to Bedrock texture packs
66

77
Look at https://ozelot379.github.io/ConvertJavaTextureToBedrock
88

99
It works directly in your browser
1010

1111
It supports currently the follow Minecraft versions:
1212

13-
| Minecraft | Version |
14-
|-----------|---------------------|
15-
| Java | v1.13.x or v1.14.x |
16-
| Bedrock | v1.13.x |
13+
| Minecraft | Version |
14+
|-----------|---------|
15+
| Java | v1.13.x, v1.14.x or v1.15.x |
16+
| Bedrock | v1.14.x |
1717

18-
Currently it supports to convert blocks, items, entities, paintings, particles, map icons and mob effects textures
18+
Currently it supports to convert blocks, items, entities, paintings, particles, map icons, mob effects and some basic ui textures
1919

2020
Some conversions of HD texture packs may takes a while
2121

@@ -38,11 +38,11 @@ You can now convert your texture packs like
3838
ConvertJavaTextureToBedrock -i input/java_texture_pack.zip -o output/bedrock_texture_pack.mcpack
3939
```
4040

41-
| Parameter | Description |
42-
|---------------|-------------------------------|
43-
| -i (Required) | Input folder or zip path |
41+
| Parameter | Description |
42+
|-----------|-------------|
43+
| -i (Required) | Input folder or zip path |
4444
| -o (Required) | Output folder or zip path |
45-
| -l | Show log (Default `true`) |
45+
| -l | Show log (Default `true`) |
4646

4747
## Known issues
4848
- Convert horse textures is very tricky and may buggy
@@ -60,35 +60,32 @@ For instance for textures, that can not be converted or are not converted correc
6060

6161
This files are applied additionally before output
6262

63-
# Debug and build
64-
First clone this repo and install the dependencies
65-
63+
# Debug
64+
First clone this repo
6665
```bash
67-
yarn
66+
git clone https://github.com/ozelot379/ConvertJavaTextureToBedrock
67+
cd ConvertJavaTextureToBedrock
6868
```
6969

70-
Then you can start the debug
71-
72-
cli:
70+
Then install the dependencies
7371
```bash
74-
yarn debug:cli
72+
yarn
7573
```
7674

77-
webapp:
75+
## WebApp
7876
```bash
79-
yarn debug:webapp
77+
NODE_ENV=development yarn debug:webapp
8078
```
8179

82-
You can create a build
83-
80+
## CLI
8481
```bash
85-
yarn build
82+
NODE_ENV=development yarn debug:cli
8683
```
8784

8885
# How this work
8986
This project uses the follow main features or external libraries:
9087

91-
- [Web Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API) for convert it in the background to not freeze the gui
88+
- [Web Worker](https://developer.mozilla.org/docs/Web/API/Web_Workers_API) for convert it in the background to not freeze the ui
9289
- [jszip](https://www.npmjs.com/package/jszip) for read, modify and write zip files
9390
- [jimp](https://www.npmjs.com/package/jimp) for graphic manipulation
9491
- [file-saver](https://www.npmjs.com/package/file-saver) for deliver the converted pack to download
@@ -106,12 +103,8 @@ Import it in your code, if you use webpack
106103
```javascript
107104
import ConvertJavaTextureToBedrock, {ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput} from "@ozelot379/convert-minecraft-java-texture-to-bedrock";
108105
```
109-
or require it if you use native NodeJs
110-
```javascript
111-
const {default: ConvertJavaTextureToBedrock, ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput} = require("@ozelot379/convert-minecraft-java-texture-to-bedrock");
112-
```
113106

114-
You can now convert your texture packs in an `async function`
107+
You can now convert your texture packs
115108
```javascript
116109
let output;
117110
try {
@@ -120,45 +113,41 @@ try {
120113

121114
}
122115
```
123-
or self handle the `Promise`
124-
```javascript
125-
new ConvertJavaTextureToBedrock(input, output, log).convert().then((output) => {}).catch((err) => {});
126-
```
127116

128117
## Input
129-
| Import | Description |
130-
|-----------------|-------------|
131-
| `Input` | The input consists on one input entry (Common) |
132-
| `ArrayInput` | The input consists on multiple input entries (For instance a selected folder with multiple `FileInputEntry`) |
133-
| `AbstractInput` | Base input |
118+
| Import | Description |
119+
|--------|-------------|
120+
| `Input` | The input consists on one input entry (Common) |
121+
| `ArrayInput` | The input consists on multiple input entries (For instance a selected folder with multiple `FileInputEntry`) |
122+
| `AbstractInput` | Base input |
134123

135124
## Input entry
136-
| Import | For type |
137-
|-------------------------|--------------------|
138-
| `BufferInputEntry` | <ul><li>`ArrayBuffer`</li><li>`Blob`</li><li>`Buffer`</li><li>`Uint8Array`</li></ul> |
139-
| `FileInputEntry` | `File` |
140-
| `LocalFileInputEntry` | Local file |
141-
| `LocalFolderInputEntry` | Local folder |
142-
| `AbstractInputEntry` | Base input entry |
125+
| Import | For type |
126+
|--------|----------|
127+
| `BufferInputEntry` | - `ArrayBuffer`<br>- `Blob`<br>- `Buffer`<br>- `Uint8Array` |
128+
| `FileInputEntry` | `File` |
129+
| `LocalFileInputEntry` | Local file |
130+
| `LocalFolderInputEntry` | Local folder |
131+
| `AbstractInputEntry` | Base input entry |
143132

144133
## Output
145-
| Import | For type |
146-
|---------------------|---------------|
134+
| Import | For type |
135+
|--------|----------|
147136
| `ArrayBufferOutput` | `ArrayBuffer` |
148-
| `BlobOutput` | `Blob` |
149-
| `BufferOutput` | `Buffer` |
150-
| `FileBlobOutput` | `File` |
151-
| `LocalFileOutput` | Local file |
152-
| `LocalFolderOutput` | Local folder |
153-
| `Uint8ArrayOutput` | `Uint8Array` |
154-
| `AbstractOutput` | Base output |
137+
| `BlobOutput` | `Blob` |
138+
| `BufferOutput` | `Buffer` |
139+
| `FileBlobOutput` | `File` |
140+
| `LocalFileOutput` | Local file |
141+
| `LocalFolderOutput` | Local folder |
142+
| `Uint8ArrayOutput` | `Uint8Array` |
143+
| `AbstractOutput` | Base output |
155144

156145
## Log
157-
| Import | Description |
158-
|---------------|----------------|
159-
| `ConsoleLog` | Log to console |
160-
| `SlientLog` | Disable log |
161-
| `AbstractLog` | Base log |
146+
| Import | Description |
147+
|--------|-------------|
148+
| `ConsoleLog` | Log to console |
149+
| `SlientLog` | Disable log |
150+
| `AbstractLog` | Base log |
162151

163152
## Example
164153
```javascript

‎package.json‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@ozelot379/convert-minecraft-java-texture-to-bedrock",
33
"productName": "ConvertJavaTextureToBedrock",
4-
"version": "1.13.5",
5-
"description": "Convert Minecraft Java texture packs to Minecraft Bedrock texture packs",
4+
"version": "2.0.0",
5+
"description": "Convert Minecraft Java texture packs to Bedrock texture packs",
66
"keywords": [
77
"Minecraft",
88
"Texture",
@@ -23,13 +23,14 @@
2323
"homepage": "https://github.com/ozelot379/ConvertJavaTextureToBedrock#readme",
2424
"dependencies": {},
2525
"devDependencies": {
26+
"@ozelot379/jimp-plugins": "https://github.com/ozelot379/jimp-plugins/tarball/master",
2627
"css-loader": "^3.2.0",
2728
"favicons-webpack-plugin": "^1.0.1",
2829
"file-saver": "https://github.com/eligrey/FileSaver.js",
2930
"fs-extra": "^8.1.0",
3031
"gh-pages": "^2.1.1",
3132
"html-webpack-plugin": "^3.2.0",
32-
"jimp": "^0.6.4",
33+
"jimp": "^0.9.3",
3334
"jszip": "^3.2.2",
3435
"less": "^3.10.3",
3536
"less-loader": "^5.0.0",
@@ -49,18 +50,15 @@
4950
"yargs": "^14.0.0"
5051
},
5152
"engines": {
52-
"node": ">=10.0.0"
53+
"node": ">=12.0.0"
5354
},
5455
"main": "dist/index.js",
5556
"bin": {
5657
"ConvertJavaTextureToBedrock": "dist/cli.js"
5758
},
5859
"scripts": {
59-
"build": "webpack --config ./webpack.config.cli.js && webpack --config ./webpack.config.webapp.js",
60-
"cli": "node ./dist/cli.js",
61-
"debug:cli": "webpack --mode=development --config ./webpack.config.cli.js && yarn cli",
60+
"debug:cli": "webpack --config ./webpack.config.cli.js && node ./dist/cli.js",
6261
"debug:webapp": "webpack-dev-server --config ./webpack.config.webapp.js",
63-
"prepublishOnly": "yarn build && yarn publishGhPages",
64-
"publishGhPages": "gh-pages -d ./dist/webapp"
62+
"prepublishOnly": "webpack --config ./webpack.config.cli.js && webpack --config ./webpack.config.webapp.js && gh-pages -d ./dist/webapp"
6563
}
6664
}

‎src/cli.js‎

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
import ConvertJavaTextureToBedrock, {
2-
ConsoleLog,
3-
Input,
4-
LocalFileInputEntry,
5-
LocalFileOutput,
6-
LocalFolderInputEntry,
7-
LocalFolderOutput,
8-
SilentLog
2+
ConsoleLog,
3+
Input,
4+
LocalFileInputEntry,
5+
LocalFileOutput,
6+
LocalFolderInputEntry,
7+
LocalFolderOutput,
8+
SilentLog
99
} from ".";
1010
import fs from "fs-extra";
1111
import PACKAGE from "./../package";
1212
import yargs from "yargs";
1313

1414
(async () => {
15-
const argv = yargs(process.argv)
16-
.options({
17-
i: {
18-
alias: "input",
19-
demand: true,
20-
describe: "Input folder or zip path",
21-
type: "string"
22-
},
23-
o: {
24-
alias: "output",
25-
demand: true,
26-
describe: "Output folder or zip path",
27-
type: "string"
28-
},
29-
l: {
30-
alias: "log",
31-
default: true,
32-
describe: "Log",
33-
type: "boolean"
34-
}
35-
})
36-
.help("help").alias("h", "help")
37-
.version("version", PACKAGE.version).alias("v", "version")
38-
.argv;
15+
const argv = yargs(process.argv)
16+
.options({
17+
i: {
18+
alias: "input",
19+
demand: true,
20+
describe: "Input folder or zip path",
21+
type: "string"
22+
},
23+
o: {
24+
alias: "output",
25+
demand: true,
26+
describe: "Output folder or zip path",
27+
type: "string"
28+
},
29+
l: {
30+
alias: "log",
31+
default: true,
32+
describe: "Log",
33+
type: "boolean"
34+
}
35+
})
36+
.help("help").alias("h", "help")
37+
.version("version", PACKAGE.version).alias("v", "version")
38+
.argv;
3939

40-
try {
41-
return new ConvertJavaTextureToBedrock(
42-
new Input(fs.statSync(argv.input).isDirectory() ? new LocalFolderInputEntry(argv.input) : new LocalFileInputEntry(argv.input)),
43-
(argv.output.includes(".") ? new LocalFileOutput(argv.output) : new LocalFolderOutput(argv.output)),
44-
(argv.log ? new ConsoleLog() : new SilentLog())
45-
).convert();
46-
} catch (err) {
47-
console.error(err.message);
40+
try {
41+
return new ConvertJavaTextureToBedrock(
42+
new Input(fs.statSync(argv.input).isDirectory() ? new LocalFolderInputEntry(argv.input) : new LocalFileInputEntry(argv.input)),
43+
(argv.output.includes(".") ? new LocalFileOutput(argv.output) : new LocalFolderOutput(argv.output)),
44+
(argv.log ? new ConsoleLog() : new SilentLog())
45+
).convert();
46+
} catch (err) {
47+
console.error(err.message);
4848

49-
process.exit(1);
50-
}
49+
process.exit(1);
50+
}
5151
})();

0 commit comments

Comments
 (0)