KubeJS

KubeJS

61M Downloads

Buckets do not work on custom waterloggable blocks

ChiefArug opened this issue ยท 2 comments

commented

Minecraft Version

1.18.2

KubeJS Version

Built from dev 6e63cfa

Rhino Version

1802.1.14-build.192

Architectury Version

4.7.78

Forge/Fabric Version

Forge. Smthn 1.18.2. IntelliJ is refusing to say

Describe your issue

You cannot use buckets on custom blocks set to be waterlogged.
This is because the object returned by the builder doesnt implement SimpleWaterloggedBlock.

This would be solved by either making waterlogging a custom type or implementing SimpleWaterloggedBlock in BasicBlockJS and just overriding all the methods to do nothing when not set to be waterlogged.

Basic recreation script (startup).
The different box size is so that minecraft allows water to flow from it.

onEvent('block.registry', event => {
	event.create('watery').defaultCutout().box(0,0,0,16,5,16).waterlogged()
})

Crash report/logs

No response

commented

I was just about to report this as well. I fixed it for my custom block by making a MaybeWaterloggedBlock interface and extending that in my block class, which just adds a blockState.hasProperty(BlockStateProperties.WATERLOGGED) && before everything that checks the waterlogged blockstate. I think that something along those lines is the cleanest solution.

commented

Fixed by #464