Skip to content

Commit

Permalink
Dirt paths and cauldrons
Browse files Browse the repository at this point in the history
  • Loading branch information
OreCruncher committed Jan 6, 2025
1 parent a5c0830 commit 8e2028d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public Optional<SoundInstance> remapSound(SoundInstance soundInstance) {
BlockState blockState = null;
if (mappingRule.isBlockStateNeeded()) {
var level = GameUtils.getWorld().orElseThrow();
var pos = BlockPos.containing(soundInstance.getX(), soundInstance.getY(), soundInstance.getZ()).below();
var pos = BlockPos.containing(soundInstance.getX(), soundInstance.getY() + 0.25D, soundInstance.getZ()).below();
blockState = level.getBlockState(pos);

// If the blockstate is air or not solid, it means we are hanging at a block edge. Scan around looking for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,5 +322,14 @@
"min": 1.0,
"max": 1.2
}
},
{
"location": "dsurround:footsteps/dirt_path",
"soundEvent" : "dsurround:footsteps.gravel",
"volume": 0.25,
"pitch": {
"min": 1.0,
"max": 1.2
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
],
"factory": "dsurround:footsteps.leaves_through"
},
{
"blocks": [
"minecraft:dirt_path"
],
"factory": "dsurround:footsteps/dirt_path"
},
{
"factory": "dsurround:footsteps.grass"
}
Expand Down Expand Up @@ -49,6 +55,12 @@
{
"soundEvent": "minecraft:block.stone.step",
"rules": [
{
"blocks": [
"#minecraft:cauldrons"
],
"factory": "dsurround:footsteps.metalbox"
},
{
"factory": "dsurround:footsteps.stone"
}
Expand Down

0 comments on commit 8e2028d

Please sign in to comment.