KubeJS

KubeJS

69M Downloads

Block material modification doesn't seem to work

mosharky opened this issue ยท 4 comments

commented

Minecraft Version

1.18.1

KubeJS Version

1801.4.2-build.300

Rhino Version

1801.1.8-build.102

Architectury Version

3.7.22

Forge/Fabric Version

Forge 39.0.79

Describe your issue

I can't get this startup script to change the refinedstorage:cable block's material. I'm not sure if this is a problem on my end or not here.

onEvent('block.modification', event => {
    event.modify('refinedstorage:cable', block => {
        block.material = 'iron'
    })
})

Crash report/logs

There's nothing in the startup log, but the script is actually loading

commented

Marking this for the KubeJS 6.0 milestone, as we will likely be separating materials from sound types then, however this has also been fixed on 1.18 with the latest build (once that has passed CI)

commented

How are you confirming that the block's material hasn't changed? If it's because the sound type hasn't changed, that's because in Vanilla, materials and sound types are actually separate things, so the issue here would lie in us not updating the sound type as well

commented

yup, sound wasn't changing. I'm not sure if that has been fixed since then though, havent tried to change block materials for a while

commented

out of curiosity, what use does changing the material have if not for the sound?