Presence Footsteps ignoring KJS blockSoundType modifications
StockiesLad opened this issue ยท 5 comments
It simply plays the original sounds as if it weren't there. Disabling presence footsteps fixes this. Latest unofficial Forge version works as intended but it has some other unresolved bugs.
Here's the script if it is even needed.
const SoundType = Java.loadClass('net.minecraft.world.level.block.SoundType')
const SoundEvents = Java.loadClass('net.minecraft.sounds.SoundEvents')
function coveredStone(step) {
return new SoundType(
1.0,
1.0,
SoundEvents.STONE_BREAK,
step,
SoundEvents.STONE_PLACE,
SoundEvents.STONE_HIT,
SoundEvents.STONE_FALL
);
}
const WART_COVERED_STONE = coveredStone(SoundEvents.WART_BLOCK_STEP)
const GRASS_COVERED_STONE = coveredStone(SoundEvents.GRASS_STEP)
BlockEvents.modification(event => {
let grass = ['overgrown_dacite', 'overgrown_stone']
grass.forEach(element => event.modify(global.appendResourceLocation('biomeswevegone', element) , block => block.soundType = GRASS_COVERED_STONE))
})I have no idea what KJS is, but if the blocks' sound types are changed by setting the block's sound types, it will work.
If not, you have to set it via presence footsteps using a resource pack.
See here for how you set up a blockmap.
I have no idea what KJS is, but if the blocks' sound types are changed by setting the block's sound types, it will work.
If not, you have to set it via presence footsteps using a resource pack.
Kjs is KubeJS. It gives the ability to override any block properties (among many, many other things). I guess where the issue lays is how tags seem to unconditionally override the sound a block makes for some reason. I tested this by putting 'minecraft:mycelium' to some random blocks and it ended up changing said block to the same sound mycelium makes.
FYI: I'm not modifying vanilla blocks, I'm modifying modded ones where they sometimes get the sound property wrong
I have no idea what KJS is, but if the blocks' sound types are changed by setting the block's sound types, it will work.
If not, you have to set it via presence footsteps using a resource pack.Kjs is KubeJS. It gives the ability to override any block properties (among many, many other things). I guess where the issue lays is how tags seem to unconditionally override the sound a block makes for some reason. I tested this by putting 'minecraft:mycelium' to some random blocks and it ended up changing said block to the same sound mycelium makes.
This sounds like Presence Footsteps is doing what it's expected to do then? Unless I'm misunderstanding what you're doing. It sounds like you're changing other blocks to have the sound group for mycelium. Of course that will cause them to have the same sounds as mycelium
FYI: I'm not modifying vanilla blocks, I'm modifying modded ones where they sometimes get the sound property wrong
I would point you again to the wiki page on creating your own blockmap.json then, as modded blocks are the intended usecase (if the mod doesn't put in the effort to declare its own)
The sounds based on vanilla material is merely a fallback solution, and those lookups come from the primitives.json (which you can also customise and override with a resourcepack)
I have no idea what KJS is, but if the blocks' sound types are changed by setting the block's sound types, it will work.
If not, you have to set it via presence footsteps using a resource pack.
Kjs is KubeJS. It gives the ability to override any block properties (among many, many other things). I guess where the issue lays is how tags seem to unconditionally override the sound a block makes for some reason. I tested this by putting 'minecraft:mycelium' to some random blocks and it ended up changing said block to the same sound mycelium makes.
This sounds like Presence Footsteps is doing what it's expected to do then? Unless I'm misunderstanding what you're doing. It sounds like you're changing other blocks to have the sound group for mycelium. Of course that will cause them to have the same sounds as mycelium
FYI: I'm not modifying vanilla blocks, I'm modifying modded ones where they sometimes get the sound property wrong
I would point you again to the wiki page on creating your own blockmap.json then, as modded blocks are the intended usecase (if the mod doesn't put in the effort to declare its own)
The sounds based on vanilla material is merely a fallback solution, and those lookups come from the primitives.json (which you can also customise and override with a resourcepack)
Alright. I thought that the tag things were hardcoded but they aren't