3.4.1 • Published 4 years ago

@ozelot379/convert-minecraft-java-texture-to-bedrock v3.4.1

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
4 years ago

THIS PROJECT IS NO OFFICIAL MINECRAFT PRODUCT - NOT AUTHORIZED OR ASSOCIATED BY MOJANG


API for convert Minecraft Java texture packs to Bedrock texture packs

Description

Look at https://github.com/ozelot379/ConvertJavaTextureToBedrock#user-content-description

Requirements

This is an "ES module"

So it requires a current web browser or NodeJS v14

If you need older support, please try to use something like webpack or babel

Use it direct in your code

Add it as a dependency to your package.json

yarn add @ozelot379/convert-minecraft-java-texture-to-bedrock

Import it in your code

import {ConsoleLog, ConvertJavaTextureToBedrock, Input, LocalFileInputEntry, LocalFileOutput} from "@ozelot379/convert-minecraft-java-texture-to-bedrock";

You can now convert your texture packs

let output;
try {
    output = await new ConvertJavaTextureToBedrock(input, output, log, options).convert();
} catch (err) {

}

Input

ImportDescription
InputThe input consists on one input entry (Common)
ArrayInputThe input consists on multiple input entries (For instance a selected folder with multiple FileInputEntry)
AbstractInputBase input

Input entry

ImportFor type
BufferInputEntry- ArrayBuffer- Blob- Buffer- Uint8Array
FileInputEntryFile
LocalFileInputEntryLocal file
LocalFolderInputEntryLocal folder
AbstractInputEntryBase input entry

Output

ImportFor type
ArrayBufferOutputArrayBuffer
BlobOutputBlob
BufferOutputBuffer
FileBlobOutputFile
LocalFileOutputLocal file
LocalFolderOutputLocal folder
Uint8ArrayOutputUint8Array
AbstractOutputBase output

Log

ImportDescription
ConsoleLogLog to console
SlientLogDisable log
AbstractLogBase log

Options

KeyTypeDefaultDescription
experimentalboolfalseEnable experimental conversions

Example

import {ConsoleLog, ConvertJavaTextureToBedrock, Input, LocalFileInputEntry, LocalFileOutput} from "@ozelot379/convert-minecraft-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}`);
})();

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

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 browser ui (web app)
  • 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
  • Service Worker for offline cache and usage (web app)

Web app

Look at https://github.com/ozelot379/ConvertJavaTextureToBedrock

CLI

Look at https://github.com/ozelot379/ConvertJavaTextureToBedrockCli

Report issue

Use github repo issues (https://github.com/ozelot379/ConvertJavaTextureToBedrock/issues/new/choose)

3.4.1

4 years ago

3.4.0

4 years ago

3.3.4

4 years ago

3.3.3

4 years ago

3.3.2

4 years ago

3.3.1

4 years ago

3.3.0

4 years ago

3.2.8

4 years ago

3.2.7

4 years ago

3.2.6

4 years ago

3.2.5

4 years ago

3.2.4

4 years ago

3.2.3

4 years ago

3.2.2

4 years ago

3.2.1

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.13.5

4 years ago

1.13.4

4 years ago

1.13.3

4 years ago

1.13.2

4 years ago

1.13.1

4 years ago

1.13.0

4 years ago

1.12.1

4 years ago

1.12.0

4 years ago

1.11.2

5 years ago

1.11.1

5 years ago

1.11.0

5 years ago

1.10.1

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago