@ozelot379/convert-java-texture-to-bedrock v1.13.4
THIS PROJECT IS NO OFFICIAL MINECRAFT PRODUCT - NOT AUTHORIZED OR ASSOCIATED BY MOJANG
Convert Minecraft Java texture packs to Minecraft Bedrock texture packs
Look at https://ozelot379.github.io/ConvertJavaTextureToBedrock
It works directly in your browser
It supports currently the follow Minecraft versions:
Minecraft | Version |
---|---|
Java | v1.13.x or v1.14.x |
Bedrock | v1.13.x |
Currently it supports to convert blocks, items, entities, paintings, particles, map icons and mob effects textures
Some conversions of HD texture packs may takes a while
This project is inspired by the no longer continued PCTexture2PE
CLI
As an alternative you can also use the cli version
First be sure you have installed NodeJS (At least the LTS version) and install Yarn
Then install this global so you can use the binary
yarn global add @ozelot379/convert-java-texture-to-bedrock
You can now convert your texture packs like
ConvertJavaTextureToBedrock -i input/java_texture_pack.zip -o output/bedrock_texture_pack.mcpack
Parameter | Description |
---|---|
-i (Required) | Input folder or zip path |
-o (Required) | Output folder or zip path |
-l | Show log (Default true ) |
Known issues
- Convert horse textures is very tricky and may buggy
- Convert weather textures (rain and snow) may not works (seems to be an other format as the default)
Extras (for texture pack creators)
UUID
You can create the bedrock_uuid_header
and bedrock_uuid_module
files in your input, to keep the same uuid on repeating conversions - otherwise, random uuids are generated each time and you need to reselect the texture pack again in the game
Custom textures
You can put custom textures in a bedrock_textures
folder in your input
For instance for textures, that can not be converted or are not converted correctly
This files are applied additionally before output
Debug and build
First clone this repo and install the dependencies
yarn
Then you can start the debug
cli:
yarn debug:cli
webapp:
yarn debug:webapp
You can create a build
yarn build
How this work
This project uses the follow main features or external libraries:
- Web Worker for convert it in the background to not freeze the gui
- jszip for read, modify and write zip files
- jimp for graphic manipulation
- file-saver for deliver the converted pack to download
- webpack for bundle the dist code
- gh-pages for publish a new version to the github static page
Use it direct in your code
Add it as a dependency to your package.json
yarn add @ozelot379/convert-java-texture-to-bedrock
Import it in your code, if you use webpack
import ConvertJavaTextureToBedrock, {ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput} from "@ozelot379/convert-java-texture-to-bedrock";
or require it if you use native NodeJs
const {default: ConvertJavaTextureToBedrock, ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput} = require("@ozelot379/convert-java-texture-to-bedrock");
You can now convert your texture packs in an async function
let output;
try {
output = await new ConvertJavaTextureToBedrock(input, output, log).convert();
} catch (err) {
}
or self handle the Promise
new ConvertJavaTextureToBedrock(input, output, log).convert().then((output) => {}).catch((err) => {});
Input
Import | Description |
---|---|
Input | The input consists on one input entry (Common) |
ArrayInput | The input consists on multiple input entries (For instance a selected folder with multiple FileInputEntry ) |
AbstractInput | Base input |
Input entry
Import | For type |
---|---|
BufferInputEntry | ArrayBuffer Blob Buffer Uint8Array |
FileInputEntry | File |
LocalFileInputEntry | Local file |
LocalFolderInputEntry | Local folder |
AbstractInputEntry | Base input entry |
Output
Import | For type |
---|---|
ArrayBufferOutput | ArrayBuffer |
BlobOutput | Blob |
BufferOutput | Buffer |
FileBlobOutput | File |
LocalFileOutput | Local file |
LocalFolderOutput | Local folder |
Uint8ArrayOutput | Uint8Array |
AbstractOutput | Base output |
Log
Import | Description |
---|---|
ConsoleLog | Log to console |
SlientLog | Disable log |
AbstractLog | Base log |
Example
import ConvertJavaTextureToBedrock, {ConsoleLog, Input, LocalFileInputEntry, LocalFileOutput} from "@ozelot379/convert-java-texture-to-bedrock";
(async () => {
let output;
try {
output = await new ConvertJavaTextureToBedrock(new Input(new LocalFileInputEntry("input/java_texture_pack.zip")), new LocalFileOutput("output/bedrock_texture_pack.mcpack"), new ConsoleLog()).convert();
} catch (err) {
console.log(err);
return;
}
console.log(`Output: ${output}`);
})();
5 years ago