KubeJS (Old)

KubeJS (Old)

3M Downloads

Tags from startup builders do not get added

ChiefArug opened this issue ยท 2 comments

commented

Minecraft Version

1.19.2

KubeJS Version

kubejs-forge-1902.6.1-build.9999 (same as build.236 with #646 applied)

Rhino Version

rhino-forge-1902.2.2-build.268.jar

Architectury Version

architectury-6.5.85-forge.jar

Forge/Fabric Version

43.2.14

Describe your issue

When I use the .tag or .tagBlock method on a BlockBuilder it does not work, there are no tags applied to said block.

StartupEvents.registry('block', event => {
event.create('layer_1').model('block/white_concrete').displayName("Floor").tag("mineable/pickaxe")
event.create('layer_2').requiresTool(true).model('block/brown_concrete').displayName("Floor").tag("mineable/pickaxe").tag("requires_stone_tool")
event.create('layer_3').requiresTool(true).model('block/blue_concrete').displayName("Floor").tag("mineable/pickaxe").tag("requires_iron_tool")
event.create('layer_4').requiresTool(true).model('block/orange_concrete').displayName("Floor").tag("mineable/pickaxe").tag("requires_diamond_tool")
event.create('layer_5').requiresTool(true).model('block/black_concrete').displayName("Floor").tag("mineable/pickaxe").tag("forge:requires_netherite_tool")
})

image

Crash report/logs

No response

commented

I believe this is caused by not having a tag event for that registry type, so the check in dev.latvian.mods.kubejs.core.TagLoaderKJS#kjs$customTags#L19 to hasListeners fails.

commented

Minecraft Version

1.19.2

KubeJS Version

kubejs-forge-1902.6.1-build.362.jar

Rhino Version

rhino-forge-1902.2.2-build.268.jar

Architectury Version

architectury-6.5.85-forge.jar

Forge/Fabric Version

Forge 43.2.14

Describe your issue

When using .tagBlock method on a BlockBuilder it does not work, there are no tags applied to said block.

StartupEvents.registry('block', event => {
    event.create('kubejs:example_block')
        .displayName('Example Block with no Block Tags for Some Reason')
        .material('metal')
        .hardness(1.0)
        .requiresTool(true)
        .tagBlock('minecraft:mineable/pickaxe')
        .tagBlock('minecraft:needs_iron_tool')
        .textureAll('kubejs:block/example_block')
})

Expectation:

Just as an example...
image

Reality:

image

Latest Log

https://gist.github.com/CelestialAbyss/d6fe963290c988d24ef2887438da555f

Here's startup.log

[16:58:57] [INIT] KubeJS 1902.6.1-build.362; MC 1902 forge
[16:58:57] [INIT] Loaded plugins:
[16:58:57] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgePlugin
[16:58:57] [INIT] - dev.latvian.mods.kubejs.create.KubeJSCreatePlugin
[16:58:57] [INFO] startup_scripts:startup_core.js:3: Hello, World! (You will only see this line once in console, during startup)
[16:58:57] [INFO] Loaded script startup_scripts:startup_core.js in 0.077 s
[16:58:57] [INFO] Loaded 1/1 KubeJS startup scripts in 0.387 s