Biome Effect Modifiers - MehVahdJukaar/polytone GitHub Wiki
Biome Effect Modifiers
Biome Effect Modifiers feature allows you to tweak all the rendering parameters of a biome using a Resource Pack (client sided) insteaed of a Data Pack like its usually done.
These include:
- Water Color
- Fog Color
- Water Fog Color
- Sky Color
- Foliage Color Override
- Grass Color Override
- Ambient Particle
- Music
- Biome Sounds
Getting Started
The file will have to be in assets/[biome namespace]/polytone/biome_modifiers/[biome path].json
.
For example if you want to modify quark:glimmering_weald
you can do so with a file located in assets/quark/polytone/biome_modifiers/glimmering_weald.json
Explicit targeting
Alternatively, if you want to manually specify your targets you can place this json in assets/[your pack namespace]/polytone/biome_modifiers/[some name].json
(Any path will work but this is recommended to avoid overwriting Implicit defined targets).
Then you can add the targets
field to the json containing a list of valid Biome ids as follows:
{
"targets": ["minecraft:stony_beach", "minecraft:beach"]
}
Here is an example of how the .json
could look.
{
"fog_color": 2324,
"water_fog_color": 0,
"sky_color": 33,
"particle": {
"options": {
"type": "minecraft:poof"
},
"probability": 0.2
}
}
Note that all fields are optional.
Vanilla Resources
There are many more parameters you can add here, however this file serializes exactly the same as a vanilla BiomeSpecialEffect object found in any biome definition.
As such you can find more info on the Official Minecraft Wiki
You can also use Misode Datapack Generator to create the content of this file.
Note that we only care about the "Effects"
sub section and copy paste it in the json directly (without the key "effects"
)
https://misode.github.io/worldgen/biome/
For redundancy here is an image showing the revelant section on Misode website as well as the output json you can copy.
Fog Shape
Additionall thise json element can contain 2 more fields that can control the shape of fog in a particular biome.These are:
fog_fade
and fog_radius
fog_radius
: How far away the fog will be.fog_fade
: This controls how harsh the transition from no fog to foggy will be. set to 0 for no transition, 1 for default one.
Both are Multipliers for the game current fog radius and fade values. Set to 1 to have no effect.
(in previous versions these were called fog_end
and fog_start
)
like this:
{
"fog_radius": 0.5,
"fog_fade": 0.9
}
Alternatively, if you want more control for things such as making fog Weather or Day Time dependent you can use an MathExpression (check out Scripting section), as follows: In this example fog end will decrease when weather is rainy
{
"fog_radius": "1 - RAIN"
}