#adding block help

10 messages · Page 1 of 1 (latest)

rancid granite
#

StartupEvents.registry('block', event => {
event.create('andesite_machine')
.displayName('Andesite Machine')
.material('wood')
.hardness(0.8)
.resistance(1.5)
.tagBlock('mineable/pickaxe')
.requiresTool(false)
})
StartupEvents.registry('block', event => {
event.create('copper_machine')
.displayName('Copper Machine')
.material('metal')
.hardness(0.8)
.resistance(1.5)
.tagBlock('mineable/pickaxe')
.requiresTool(false)
})

why is the andesite machine block being added but not the copper machine?

ruby kiteBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

peak breach
#

??kjslogs

void pathBOT
# peak breach ??kjslogs

You can find your KubeJS startup log in /minecraft/logs/kubejs/startup.log.
If you are on 1.18 or 1.16 it will be called startup.txt.
Please send it if asked, as it contains helpful information.

rancid granite
#

[17:57:20] [INIT] KubeJS 2001.6.5-build.16; MC 2001 forge
[17:57:20] [INIT] Loaded plugins:
[17:57:20] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgePlugin
[17:57:20] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgeClientPlugin
[17:57:20] [INIT] - net.mehvahdjukaar.sawmill.integration.KubeJsPlugin
[17:57:20] [INIT] - dev.latvian.mods.kubejs.create.KubeJSCreatePlugin
[17:57:21] [INFO] Loaded script startup_scripts:blocks.js in 0.138 s
[17:57:21] [INFO] example.js#5: Hello, World! (Loaded startup scripts)
[17:57:21] [INFO] Loaded script startup_scripts:example.js in 0.003 s
[17:57:21] [INFO] Loaded 2/2 KubeJS startup scripts in 0.999 s with 0 errors and 0 warnings
[17:57:22] [WARN] blocks.js#8: blockBuilder.material(string) is no longer supported! Use .soundType(SoundType) and .mapColor(MapColor) instead!

late jolt
#

try it with this:

StartupEvents.registry('block', event => {
    event.create('andesite_machine')
    .displayName('Andesite Machine')
    .mapColor('wood')
    .hardness(0.8)
    .resistance(1.5)
    .tagBlock('mineable/pickaxe')
    .requiresTool(false);
    
    event.create('copper_machine')
    .displayName('Copper Machine')
    .mapColor('metal')
    .hardness(0.8)
    .resistance(1.5)
    .tagBlock('mineable/pickaxe')
    .requiresTool(false);
})
rancid granite
#

ok

late jolt
#

material() are seperated into mapColor() and soundType() in 1.20

rancid granite
#

it works, ty

void pathBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue!
This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You should create a new post for unrelated issues.