Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buckets do not work on custom waterloggable blocks #462

Closed
ChiefArug opened this issue Aug 25, 2022 · 2 comments
Closed

Buckets do not work on custom waterloggable blocks #462

ChiefArug opened this issue Aug 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ChiefArug
Copy link
Contributor

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

@ChiefArug ChiefArug added the bug Something isn't working label Aug 25, 2022
@artemisSystem
Copy link

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.

@ChiefArug
Copy link
Contributor Author

Fixed by #464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants