blocks.json
{
"blocks": [
"blockSpec"
],
"clearSounds": false,
"soundChance": "0.01",
"acoustics": null,
"effects": null
}
Property |
Value Type |
Comment |
|---|---|---|
blocks |
String Array |
The block states for which the configuration options apply. At least one entry is required. See Block Specifications. |
clearSounds |
Boolean |
Clears existing sound configuration for the blocks. Default is |
soundChance |
String |
Script that provides the chance that a sound will be emitted. Default is |
acoustics |
Acoustic Array |
An array of acoustics that can play. Default is |
effects |
Effect Array |
An array of effects that can generate. Default is |
{
"effect": "effect",
"conditions": "script",
"spawnChance": null
}
Effect Configuration
Property |
Value Type |
Comment |
|---|---|---|
effect |
String |
The type of effect. Possible values are |
conditions |
String |
Script that determines if the effect is eligible for activation. See Scripting. |
spawnChance |
String |
Script that provides the spawn chance of the effect. Default is |
Examples
{
"blocks": [
"#dsurround:effects/fireflies"
],
"effects": [
{
"effect": "firefly",
"conditions": "weather.isNotRaining() && (diurnal.isNight() || diurnal.isSunset()) && !(HOT || weather.canWaterFreeze())",
"spawnChance": "0.035"
}
]
}
Firefly effect for any blocks that have the tag dsurround:effects/fireflies.
{
"blocks": [
"minecraft:nether_wart[age=3]"
],
"effects": [
{
"effect": "fire_jet",
"spawnChance": "0.005"
}
]
}
Full grown Nether Wart spawning small flames on top.
{
"blocks": [
"minecraft:soul_sand"
],
"soundChance": "0.000125",
"acoustics": [
{
"factory": "dsurround:soulsand.laughter",
"conditions": "dim.getId() == 'minecraft:the_nether'"
}
]
}
Randomly play laughter sound for a Soul Sand block when in the Nether dimension.