Soo...
Does anybody know if it is possible to test if someone is drinking a potion or water bottle with command blocks or any other method? If you know please tell me how and I will love you forever <3
Does anybody know if it is possible to test if someone is drinking a potion or water bottle with command blocks or any other method? If you know please tell me how and I will love you forever <3
Create an account or sign in to comment.
15
@pale1 You misunderstood me and PieFace_, What he meant, was that once they get ahold of the water bottle and drink it, it'll automatically go away. There will be no way to pick it back up or stuff like that
Well I want people to be able to reuse the bottle...
You can test for a player holding an empty bottle in their inventory. Its not too hard, look it up if you don't know how. And if you really wanna go to the extremes, there are plugins that let you check someones inventory
If its not hard couldn't you have supplied the answer? Also this is a vanilla thing so I cant use plugins
You could run a /clear for an empty bottle, but you could not test for someone who is actively drinking
The main goal here is for you to drink a potion or water and you get points. so the potion will turn into an empty bottle at the end of the operation and you get 1 point
Yeah, if you put a clock on a /clear @p minecraft:water_bottle (or whatever the id is), when you drink the potion, it turns into an empty bottle and then the command block will output into a comparator, which could give points or whatever it needs to.
But then wouldn't it give the player points as long as they hold an empty bottle in their inventory?(If not they could probably drop it then pick it up again to get more points)
Sorry if I was unclear.
So you would put /clear @p minecraft:water_bottle and attach a clock to it so it is constantly trying to clear the waterbottle.*
As soon as the command block finds the player with a water bottle, it removes it from the player's inventory, and an output comparator turns on.
The output can do anything, including add a number to a scoreboard objective.
I hope this makes sense.
*The @p would have to be more complex if it was dealing with multiplayer, but that is a different topic.
So you would put /clear @p minecraft:water_bottle and attach a clock to it so it is constantly trying to clear the waterbottle.*
As soon as the command block finds the player with a water bottle, it removes it from the player's inventory, and an output comparator turns on.
The output can do anything, including add a number to a scoreboard objective.
I hope this makes sense.
*The @p would have to be more complex if it was dealing with multiplayer, but that is a different topic.
Oh, ok then............
Then I can't help you there. I'm hopeless with redstone.
Then I can't help you there. I'm hopeless with redstone.
Its alright, thanks for trying though...
Simple.
Look at the bottle they are drinking. If it is any colour but blue, it's a potion. If it is blue, well.......ask them if they drank a potion or just regular water.
Look at the bottle they are drinking. If it is any colour but blue, it's a potion. If it is blue, well.......ask them if they drank a potion or just regular water.
I plan on using redstone with this and putting it into a map. If people download the map I shouldn't have to be there watching them...