-
Bug
-
Resolution: Unresolved
-
None
-
1.21.0
-
None
-
Community Consensus
-
Multiple
Hey,
I hope this is the right place to report this, but while experimenting with the Script API i found a problem.
When trying to cancel the placement of water using scripting (world.beforeEvents.itemUseOn), it works perfectly fine, unless it is placed on a block that can be waterlogged, there, it will just normally place the water. I've attached a world with a script that allows to test the issue, as well as a video showing the issue
**
How to Reproduce:
- Create a world with a behavior pack and add a script that includes the following code (or use the attached world file):
world.beforeEvents.itemUseOn.subscribe((event) => { if (event.itemStack.typeId === "minecraft:water_bucket") { event.cancel = true; } });
- Join the world and try placing water, you will see the expected result
- Try placing water on a waterloggable block (fence, slab, etc.)
Observed Result:
The waterloggable block will be waterlogged, even though the item use was cancelled.
Expected Result:
The waterloggable block should not be waterlogged.