Skip to content

An "automated" way to handle modded blocks/items and import information into block.properties & item.properties files.

License

Notifications You must be signed in to change notification settings

Allexio/mc-automated-properties

Repository files navigation

mc-automated-properties

An "automated" way to handle modded blocks/items and generate .properties files.

Intro / FAQ

Wait what is a .properties file?

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 world
  • item.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 that
  • entity.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.

So what does this tool do?

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!

And how does it do that exactly?

The tool is split into two parts

  1. A library of json files with clean info on vanilla & modded blocks. Each json file represents one mod (or vanilla interpretation)
  2. A python script that translates those json files into items.properties, blocks.properties, and entity.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 ;)

Which mods are supported?

Simply check out the list of json files available on this github

How to use

  1. clone the repo (or download the zip and unzip it if you only plan on using the tool and not contributing),
  2. go inside the downloaded folder, in the input_jsons folder,
  3. remove all the .json files for mods you are not using,
  4. run json_to_properties.py with python (pretty standard nowadays, if you don't have python, you'll have to download it)
  5. normally this should have generated three files: block.properties, entity.properties and item.properties
  6. download and unzip your shaderpack (once again this is meant to work with Photon only, I do not know how other shaderpacks handle this)
  7. replace the block.properties, item.properties and entity.properties inside the shaderpack with the ones that were generated by this tool
  8. rezip the shaderpack and place it in your shaderpacks folder.

Profit!

How to help

  1. clone the repo
  2. 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.
  3. copy one of the json files, (can start from whichever)
  4. rename the file to the name of the mod
  5. 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.
  6. 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!

About

An "automated" way to handle modded blocks/items and import information into block.properties & item.properties files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages