KubeJS

KubeJS

61M Downloads

Custom block gets overridden in the world

Spyeedy opened this issue ยท 5 comments

commented

Minecraft Version

1.19.2

KubeJS Version

1902.6.0-build.142

Rhino Version

1902.2.2-build.264

Architectury Version

6.5.69

Forge/Fabric Version

fabric-loader-0.14.13

Describe your issue

Any KubeJS custom block gets overridden in the world when clicking on said block with another block in-hand.

Here's how I'm registering my block

StartupEvents.registry("block", e => {
	e.create("ice_layer")
		.material("snow").hardness(0.1)
})

My block has no models nor blockstates, it's just the plain old purple-black checkered block.

I wanted to see if registering a block through KubeJS worked first.

Crash report/logs

No response

commented

That may be caused by the snow material. Does it happen with other materials?
Also, do you have any scripts doing things on block right click, double check that.
Also check any mods you have with right click on block actions.

commented

That may be caused by the snow material. Does it happen with other materials?

Alright, I'll try the other materials and reply here.

Also, do you have any scripts doing things on block right click, double check that.

I don't have any scripts that interacts with blocks in any way except for registering the blocks.

Also check any mods you have with right click on block actions.

image
These are the mods I have installed, none of them does anything with right click on block actions.

commented

I've tried stone and wood materials, my custom block is not overridden anymore. Thank you!

But how do I set the block's sound?

commented

You would need to make a custom material, like this wiki page shows: https://mods.latvian.dev/books/kubejs-legacy/page/reflection-java-access

commented

Ah I see! I will try it. Thank you so much for your help!