MCreator issue tracker has been migrated to GitHub.
Existing tickets have been migrated to GitHub. Please open new tickets on the GitHub tracker instead. If you do not have a GitHub account, all feature requests and bug reports from forums are still considered and checked by the maintainers.
The bucket is auto-generated by Minecraft Forge and can't be directly accessed even in the code.
The best solution right now is to create a custom item that represents empty bucket and one for the filled bucket and use procedures to make the switch between these two depending on the action the player makes.