Skip to content

Commit

Permalink
Minor nitpicky things
Browse files Browse the repository at this point in the history
  • Loading branch information
SwanX1 committed Jun 8, 2022
1 parent a9c4b2c commit e0b2cdb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ build
# other
eclipse
run
.vscode
logs

# Files from Forge MDK
forge*changelog.txt
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ https://www.curseforge.com/minecraft/mc-mods/nekos-enchanted-books
## How to add more textures?
This mod is mostly created dynamically using an extended class of ```ItemModelProvider```. This is used to create dynamic models for each enchantment book and one to override the vanilla enchanted book model to make it use property overrides.

But how does it know which models to add? Since minecraft only uses floats for property overrides we want to map each supported enchantment to a float value. This is done in the [properties.json](https://github.com/CGessinger/Nekos-Enchanted-Books/tree/master/src/main/resources/assets/nebs/models/properties.json). To make this file easy to read and expand, please add 1 for each modid. Then every enchantment within this mod is numbered from 0.01 to 0.99. Vanilla enchantments for example are numbered from 1.00 to 1.37. Ensorcellation is numbered from 2.00 to 2.32. Only the value 0.00 should never be assign to an enchantment, since it is meant for the default enchantment book texture.
But how does it know which models to add? Since minecraft only uses floats for property overrides we want to map each supported enchantment to a float value. This is done in the [properties.json](./common/main/resources/assets/nebs/models/properties.json). To make this file easy to read and expand, please add 1 for each modid. Then every enchantment within this mod is numbered from 0.01 to 0.99. Vanilla enchantments for example are numbered from 1.00 to 1.37. Ensorcellation is numbered from 2.00 to 2.32. Only the value 0.00 should never be assign to an enchantment, since it is meant for the default enchantment book texture.

After adding the correct enchantment name to the properties, we want to add the according texture file to ```resources/assets/nebs/textures/items```. We want to name this file exactly like the enchantment name, without the extra ```enchantment.modid``` part. The protection texture for example is just called ```protection.png```.
After adding the correct enchantment name to the properties, we want to add the according texture file to ```common/main/resources/assets/nebs/textures/items```. We want to name this file exactly like the enchantment name, without the extra ```enchantment.modid``` part. The protection texture for example is just called ```protection.png```.

And, that's it. The new texture is now successfully added. Don't worry: If the according texture cannot be found, it will just default to the vanila texture.

Note: If you run this mod in your development environment, remember to always run ```runData```, when you changed the [properties.json](https://github.com/CGessinger/Nekos-Enchanted-Books/tree/master/src/main/resources/assets/nebs/models/properties.json), before doing ```runClient```. It will automatically add all the required info to ```enchanted_book.json``` in addition to the nessecary json files.
Note: If you run this mod in your development environment, remember to always run ```runData```, when you changed the [properties.json](./common/main/resources/assets/nebs/models/properties.json), before doing ```runClient```. It will automatically add all the required info to ```enchanted_book.json``` in addition to the nessecary json files.

0 comments on commit e0b2cdb

Please sign in to comment.