So I have recently played the map "Planetary Confinement - The Dune" And I was blown away by the many command block ideas and creations. One thing that wowed me the most was the thirst bar. I am decent at command blocks, but for the life of me could not figure out how he did it. I know it is "secrets of the trade" but if anyone knows the commands, could ya tell me, it'd mean a lot
(Note it IS for a map I am working on, I don't need it, but it'd be sweet)
/scoreboard players set @a[score_drinkwater_min=1] drinkwater 0
(It should probably be attached to a repeater so the thirst can still go up when the command activates)
and there you have it! a thrist bar (Your thirst can be shown using tellraw commands or a objecitve selector book and other things)
I'm not sure if thats how he did it, cause i havent played the map, And i'm also not sure if it wasn't literally a bar of thirst above the hunger bar, But anyways thats how i would do it
/scoreboard players set @a[score_drinkwater_min=1] drinkwater 0
(It should probably be attached to a repeater so the thirst can still go up when the command activates)
and there you have it! a thrist bar (Your thirst can be shown using tellraw commands or a objecitve selector book and other things)
I'm not sure if thats how he did it, cause i havent played the map, And i'm also not sure if it wasn't literally a bar of thirst above the hunger bar, But anyways thats how i would do it
You can simply use
/scoreboard players remove @p thirst 1
instead of setting it one lower each time. Also you can simply
/scoreboard players set @a[score_drinkwater_min=1] thirst 8
/scoreboard players set @a[score_drinkwater_min=1] drinkwater 0
IN Planetary confinement, there are also certian places where you do not lose thirst/lose less thirst. These areas include the spawn spaceship. TO do this, you would use a test for in the set area, then use a signal to stop the clock. (Methods of stopping the clock vary on the type of clock you are using)
(Note it IS for a map I am working on, I don't need it, but it'd be sweet)
Do
Then make it so whenever someone is new to the server, They have a thirst level of 8 i suppose.
Then you make huge redstone clock that keeps activating the command
then
/scoreboard players set @a[score_thirst_min=7] thirst 6
and so on...
and then to drink water and raise the thrist bar, You will have to add an objecctive
/scoreboard objectives add drinkwater stat.useItem.373 drinkwater
(373 is ID for a water bottle)
execute @a[score_drinkwater_min=1] ~ ~ ~ setblock 1 1 1 redstone_block 7
(feel free to change the coordinates 1 1 1)
and it will setblock a redstone block at coordinates 1 1 1
(or wherever you want it to)
/scoreboard players add @a[score_drinkwater_min=1] thirst 1
/setblock 1 1 1 air
(To remove the redstone block)
/scoreboard players set @a[score_drinkwater_min=1] drinkwater 0
(It should probably be attached to a repeater so the thirst can still go up when the command activates)
and there you have it! a thrist bar (Your thirst can be shown using tellraw commands or a objecitve selector book and other things)
I'm not sure if thats how he did it, cause i havent played the map, And i'm also not sure if it wasn't literally a bar of thirst above the hunger bar, But anyways thats how i would do it
You can simply use instead of setting it one lower each time. Also you can simply No need to setblocks.
IN Planetary confinement, there are also certian places where you do not lose thirst/lose less thirst. These areas include the spawn spaceship. TO do this, you would use a test for in the set area, then use a signal to stop the clock. (Methods of stopping the clock vary on the type of clock you are using)
turtles.
I think you have me confused with OP.
They might've used to a mod for that. Is it a FULLY vanilla map?