An "automated" way to handle modded blocks/items and generate .properties
files.
The Photon shaderpack (and I suspect others as well) use three files to define how the shader should react to different objects in game.
blocks.properties
lists all placed blocks. So for example if you have a block that is transparent or a block that emits light, it will do so once placed down in the worlditem.properties
lists all held items. So for example if you are holding a torch or a glowstone block, the shader will know that there needs to be an aura of light around you because of thatentity.properties
lists all entities. So for example mobs like the glow squid or drowner have glowy, emissive parts, and that's the file that defines those
This can be quite in-depth. For example some blocks emit light when placed, but not when held. Some do so when they are powered, some even only emit light when they are waterlogged.
This is all defined in the .properties
files.
The default .properties files mostly define vanilla blocks/items/entities.
This tool generates those same files (block.properties
, item.properties
, and entity.properties
) with a bunch of modded content, and it is very easy for people to define their own mod files so others can generate properties files for those blocks too!
The tool is split into two parts
- A library of json files with clean info on vanilla & modded blocks. Each json file represents one mod (or vanilla interpretation)
- A python script that translates those json files into
items.properties
,blocks.properties
, andentity.properties
for the Photon shaderpack (currently looking into adding support for other shaders)
Together these two things allow for MUCH faster integration of modded blocks into your shaderpack configuration files ;)
Simply check out the list of json files available on this github
- clone the repo (or download the zip and unzip it if you only plan on using the tool and not contributing),
- go inside the downloaded folder, in the
input_jsons
folder, - remove all the
.json
files for mods you are not using, - run
json_to_properties.py
with python (pretty standard nowadays, if you don't have python, you'll have to download it) - normally this should have generated three files:
block.properties
,entity.properties
anditem.properties
- download and unzip your shaderpack (once again this is meant to work with Photon only, I do not know how other shaderpacks handle this)
- replace the
block.properties
,item.properties
andentity.properties
inside the shaderpack with the ones that were generated by this tool - rezip the shaderpack and place it in your
shaderpacks
folder.
Profit!
- clone the repo
- go look at what I did for the
chipped.json
file, it should be pretty easy to understand. The description field doesn't matter, it is only there to help you know what to put inside. - copy one of the json files, (can start from whichever)
- rename the file to the name of the mod
- start working on adding custom blocks and items to your new
[mod].json
file. You do not need to add the mod id in the block names, just the block id. - when you're done, do a PR to add it directly on github
- if you don't know how it's really quite easy but if you really don't want to bother with it, you can dm me on discord with the json file
Thank you!