KubeJS

KubeJS

61M Downloads

Can't register more than one block (Fixed)

Tetrati0n opened this issue ยท 3 comments

commented

Minecraft Version

1.16.5

KubeJS Version

1605.3.19-build.299

Rhino Version

1605.1.5-build.75

Architectury Version

1.32.63

Forge/Fabric Version

36.2.35

Describe your issue

I can't create more than one block in my startup script. I can create only one bloc,, any other ones just don't get registered, the code for them is right here:

onEvent('block.registry', e => {
    e.create('block1').material('metal').hardness(10).tagBlock('minecraft:mineable/pickaxe').displayName('Tinkers Block'),
    e.create('block2').material('metal').hardness(10).tagBlock('minecraft:mineable/pickaxe').displayName('Thermal Block')
  })

Crash report/logs

latest.log

No response

commented

Please send your logs, one of the method names is probably wrong.

commented

Please send your logs, one of the method names is probably wrong.
Here's the latest log:
latest.log

commented

For anyone else wondering tagBlock is named differntly in 1.16, its just tag

Error occurred while handling event 'block.registry': TypeError: Cannot find function tagBlock in object dev.latvian.kubejs.block.BlockBuilder@65969345. (startup_scripts:custom_blocks/custom_blocks.js#2)