Started by
kolo
on
Topic category: Help with Minecraft modding (Java Edition)
i made a cauldron that can be filled up with my custom fluid. When i right click it in survival, the bucket is replaced with an empty one and doesnt get duplicated, but when im doing it in creative, it fills up the cauldron, but also places my custom fluid next to it. I need to find a way to make the bucket not place a fluid when right clicked on specific block. Can anyone help? Also im using an autogenerated bucket for my fluid.
You don't want to use an autogenerated bucket, you'll want to delete it and create your own bucket item, then make the procedure to place the fluid source yourself, with a specific exception for if the player right clicks on your custom block.
You might be able to do this by modifying the autogenerated item, but this would probably be more difficult. (I haven't worked with them myself, so I'm not entirely sure.) Or you might be able to make a procedure with the global trigger 'player right clicks block' that checks the item in their main hand and the block they're clicking on, as well as whether or not they're in creative mode, and cancels the global trigger.
And how exactly would you do this because i've been trying for a long time now and i got to the water placing part but the draining is a hole different story that i can't seem to figure out.