Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ozelot379 committed Jul 2, 2019
1 parent b0d57ca commit 2e3f05d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## [1.0.9]
- Update readme

## [1.0.8]
- May fix `bin` script

Expand Down
22 changes: 4 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It supports always the latest Minecraft versions, currently:

Older versions still usable by tags later

Currently it supports block, item and entity textures
Currently it supports blocks, items and entities textures

Supported input formats are zip archives or directories

Expand All @@ -21,27 +21,23 @@ This library is written in NodeJS, with [webpack features](https://www.npmjs.com

For the graphic manipulation, it uses the [jimp library](https://www.npmjs.com/package/jimp)


# Usage

Be sure you have installed [NodeJS](https://nodejs.org) (At least the LTS version)

I recommand to use [yarn package manager](https://yarnpkg.com), but of course you can also use `npm` (Should be included in NodeJS), if you want

I recommend to use [yarn package manager](https://yarnpkg.com), but of course you can also use `npm` (Should be included in NodeJS), if you want

## CLI
Clone the git repo:
```bash
git clone https://github.com/ozelot379/ConvertMinecraftJavaTextureToBedrock
```


Switch to the working dir:
```bash
cd ConvertMinecraftJavaTextureToBedrock
```


Install the dependencies

yarn:
Expand Down Expand Up @@ -71,7 +67,6 @@ npm run cli -i input/java_texture_pack.zip -o output/bedrock_texture_pack.mcpack
| -t | Temp directory (Default is the system temp directory) |
| -l | Verbose log |


## Direct in your code
Add it as a dependency to your `package.json`

Expand All @@ -84,23 +79,19 @@ npm:
npm install @ozelot379/convert-minecraft-java-texture-to-bedrock
```


Import it in your code, if you use webpack
```javascript
import ConvertMinecraftJavaTextureToBedrock from "@ozelot379/convert-minecraft-java-texture-to-bedrock";
```

or require it if you use native NodeJs
```javascript
const ConvertMinecraftJavaTextureToBedrock = require("@ozelot379/convert-minecraft-java-texture-to-bedrock").default;
```


You can now convert your texture packs in an `async function`
```javascript
const outputPath = await ConvertMinecraftJavaTextureToBedrock(input, output/*, "options"*/);
```

or handle the `Promise` direct
```javascript
ConvertMinecraftJavaTextureToBedrock(input, output/*, "options"*/).then((outputPath) => {}).catch((err) => {});
Expand All @@ -113,19 +104,15 @@ ConvertMinecraftJavaTextureToBedrock(input, output/*, "options"*/).then((outputP
| options.tmp | Temp directory (Default is the system temp directory) |
| options.verbose | Verbose log |


Example is the [CLI script](./src/cli.js)


## Know issues
- Horse textures (Seems to convert also horse from horse2)

- Horse textures (Seems to convert also entities/horse2 to entities/horse)

# Extras

## UUID
You can create the `bedrock_uuid_header` and `bedrock_uuid_module` files in your input, to keep the same uuid on repeating convertations - otherwise, random uuids are genereated each time and you need to reselect the texture pack again in the game

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` directory in your input
Expand All @@ -134,7 +121,6 @@ For instance for textures, that can not be converted or are not converted correc

This files are applied additionally before output


# License
The Minecraft Java and Bedrock products are © by [Mojang](https://mojang.com/)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ozelot379/convert-minecraft-java-texture-to-bedrock",
"productName": "ConvertMinecraftJavaTextureToBedrock",
"version": "1.0.8",
"version": "1.0.9",
"description": "Convert Minecraft Java texture packs to Minecraft Bedrock texture packs",
"keywords": [
"Minecraft",
Expand Down
7 changes: 6 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ module.exports = {
libraryTarget: "umd"
},
plugins: [
new webpack.BannerPlugin({banner: "#!/usr/bin/env node", raw: true, exclude: "*", include: "cli.js"}),
new webpack.BannerPlugin({
banner: "#!/usr/bin/env node",
raw: true,
exclude: "*",
include: "cli.js"
}),
],
target: "node"
};

0 comments on commit 2e3f05d

Please sign in to comment.