1

A quick question

pale1's Avatar pale111/18/13 4:09 pm
11/19/2013 3:07 pm
pale1's Avatar pale1
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
Posted by pale1's Avatar
pale1
Level 49 : Master Dolphin
222

Create an account or sign in to comment.

15

MrCreeperXD
11/18/2013 6:21 pm
Level 21 : Expert Dragonborn
MrCreeperXD's Avatar
@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
1
pale1
11/18/2013 7:44 pm
Level 49 : Master Dolphin
pale1's Avatar
Well I want people to be able to reuse the bottle...
1
Chuk40076
11/18/2013 11:15 pm
Level 30 : Artisan Geek
Chuk40076's Avatar
You said you didn't! But you have two command blocks, one for adding the point, another to give the player back an empty bottle.
1
pale1
11/19/2013 3:07 pm
Level 49 : Master Dolphin
pale1's Avatar
Alright that seems like it could work thanks!
1
MrCreeperXD
11/18/2013 5:49 pm
Level 21 : Expert Dragonborn
MrCreeperXD's Avatar
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
1
pale1
11/18/2013 5:54 pm
Level 49 : Master Dolphin
pale1's Avatar
If its not hard couldn't you have supplied the answer? Also this is a vanilla thing so I cant use plugins
1
PieFace_
11/18/2013 5:26 pm
Level 8 : Apprentice Pokemon
PieFace_'s Avatar
You could run a /clear for an empty bottle, but you could not test for someone who is actively drinking
1
pale1
11/18/2013 5:46 pm
Level 49 : Master Dolphin
pale1's Avatar
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
1
PieFace_
11/18/2013 5:51 pm
Level 8 : Apprentice Pokemon
PieFace_'s Avatar
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.
1
pale1
11/18/2013 5:53 pm
Level 49 : Master Dolphin
pale1's Avatar
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)
1
PieFace_
11/18/2013 6:18 pm
Level 8 : Apprentice Pokemon
PieFace_'s Avatar
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.
1
AnimeFanFTW
11/18/2013 4:21 pm
Level 60 : High Grandmaster Senpai
AnimeFanFTW's Avatar
Oh, ok then............
Then I can't help you there. I'm hopeless with redstone.
1
pale1
11/18/2013 5:21 pm
Level 49 : Master Dolphin
pale1's Avatar
Its alright, thanks for trying though...
1
AnimeFanFTW
11/18/2013 4:16 pm
Level 60 : High Grandmaster Senpai
AnimeFanFTW's Avatar
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.
1
pale1
11/18/2013 4:18 pm
Level 49 : Master Dolphin
pale1's Avatar
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...
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome