Fluid Properties Modifiers - MehVahdJukaar/polytone GitHub Wiki
Fluid Properties Modifiers
These are a very similar to Custom Block Properties but just allows changing fluid tint on a per Block Positon basis
Note that if you just want to modify BIOME WATER COLORS you should use Custom Biome Effects.
Getting Started
To start you'll do exactly what you did with Block Properties Modifiers (refer to their Colormap section).
Here too you'll need a .png
and or a .json
file in the /fluid_modifiers
subfolder.
First you'll need to create a .json
file in your resource pack folder in assets/[fluid namespace]/polytone/fluid_modifiers/[fluidname].json
.
Say for example the block you want to edit is create:honey
, then the file will be assets/create/polytone/fluid_modifiers/honey.json
NOTE: FLuid modifies are applied per fluid ID. This means you will need BOTH a flowing and a still one for most use cases (i.e. water and water_flowing)
Explicit targeting
Alternatively, if you want to manually specify your targets fluids, you can place this json in assets/[your pack namespace]/polytone/fluid_modifiers/[some name].json
(Any path will work but this is recommended to avoid overwriting Implicit defined targets).
Useful if you want yo modify more than 1 target for the same json.
Then you can add the targets
field containing a list of valid fluid ids to the json as follows:
{
"targets": ["minecraft:lava", "minecraft:water", "minecraft:flowing_water"]
}
NOTE: Flowing and Still fluids are 2 separate fluids so you'll most likely need to target both (i.e water
, flowing_water
)
Json Format
This file will just contain these properties. All are optional.
Field | Function |
---|---|
colormap |
A Colormap for the liquid tint |
fog_colormap |
A Colormap for the fog tint |
fog_radius |
Liquid fog radius multiplier |
fog_fade |
Liquid fog fade multiplier |
For the fog parameter pelease look up the analogous section in Biome Effect Modifiers.
Here's a couple of examples:
In this example we simply assing the pre existing foliage_color
colormap to our fluid tint and a flat colour for the fog tint. Once again refer to the colormap section.
{
"colormap": "foliage_color",
"fog_colormap": "00ff00"
}
In this second one we use the pre made builtin grid
colormap type (which requires us adding a texture in the files unlike the last example.
{
"colormap": "grid"
}
In this last example we go full custom and have a custom colormap implementation that uses perlin noise to sample a texture varying y coordinate depending on the temperature.
{
"colormap":{
"x_axis": "noise(POS_X,POS_Z)"
"y_axis": "TEMPERATURE"
}
}
Once last time this is explained in the Colormaps section
Texture only
Just like with Block Properties you can also skip this step and simply place a .png
with the name of your fluid directly in the fluid_modifiers
path
such as assets/[target fluid namespace]/polytone/fluid_modifiers/[fluid name].png
. This will create a new colormap with the default TEMPERATURE/HUMIDITY sampler.
Btw Colormap files can be any size.
It's important to note that you dont NEED to create a fluid colormap if you just want change water color you can also use Custom Biome Effects jsons to tweak the specific water / water fog color in that specific biome