#Registering two blocks
19 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
🗒️ Send the code! 🗒️
You may have an issue with a KubeJS script and you explain it to the best of your ability yet without the actual code in question we have very little to go off of in trying to assist you.
Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.
Paste version of message.txt from @formal dust
i realized i asked for the wrong log
Please send your KubeJS startup log. It can be found at /minecraft/logs/kubejs/startup.log.
If you are on 1.18 or 1.16 it will be called startup.txt.
Please send the file directly, without links or snippets.
oh okay one sec
[18:19:21] [INFO ] Loaded script startup_scripts:script.js in 0.136 s
[18:19:21] [INFO ] Loaded 1/1 KubeJS startup scripts in 0.874 s
[18:19:21] [ERR ] Error occurred while handling event 'block.registry': TypeError: Cannot find function soundType in object dev.latvian.mods.kubejs.block.custom.BasicBlockJS$Builder@791f68eb. (startup_scripts:script.js#26)```
and
onEvent('block.registry', event => {
event.create('glitter_block').displayName('Block of Glitter').soundType('sand').hardness(1.0).resistance(1.0).textureAll('kubejs:block/glitter_block')
event.create('creative_block').displayName('Block of Creative').soundType('heavy_metal').hardness(1.0).resistance(1.0).textureAll('kubejs:block/creative_block').tagBlock('my_custom_tag').requiresTool(true).tagBlock('my_namespace:my_other_tag').tagBlock('minecraft:mineable/axe').tagBlock('minecraft:mineable/pickaxe').tagBlock('minecraft:needs_iron_tool')
event.create('example_block').material('wood').hardness(1.0).displayName('Example Block')
})```
where did you get sound type from 
ah nvm
try this
onEvent('block.registry', event => {
event.create('glitter_block').displayName('Block of Glitter').material('sand').hardness(1.0).resistance(1.0)
event.create('creative_block').displayName('Block of Creative').material('heavy_metal').hardness(1.0).resistance(1.0).tagBlock('my_custom_tag').requiresTool(true).tagBlock('my_namespace:my_other_tag').tagBlock('minecraft:mineable/axe').tagBlock('minecraft:mineable/pickaxe').tagBlock('minecraft:needs_iron_tool')
event.create('example_block').material('wood').hardness(1.0).displayName('Example Block')
})
okay okay ill try this now
tysm!!