#modify Block to transparency
20 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
modify Block to transparency
i have change the script to BlockEvents.modification
new script is
BlockEvents.modification('block', event => {
event.modify('cyclic:unbreakable_block').defaultTranslucent()
})
but now i receive
startup_scripts:modify_blocks.js:2: Event handler 'BlockEvents.modification' doesn't support extra id!
new change
new code
BlockEvents.modification(e => {
e.modify('cyclic:unbreakable_block', block => {
block.defaultTranslucent()
})
})
new problem
Error occurred while handling event 'BlockEvents.modification': TypeError: Cannot find function defaultTranslucent in object Block{cyclic:unbreakable_block}. (startup_scripts:modify_blocks.js#4)
new code
BlockEvents.modification(e => {
e.modify('cyclic:unbreakable_block', block => {
block.defaultTranslucent = true
})
})
Error occurred while handling event 'BlockEvents.modification': Java class "com.lothrazar.cyclic.block.bedrock.UnbreakableBlock" has no public instance field or method named "defaultTranslucent". (startup_scripts:modify_blocks.js#3)
You can write your code in a codeblock by typing it between the codeblock delimiters:
```js :arrow_left:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
As an example, :arrow_up: will look like this:
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})