You cannot test for players who aren't online. Easiest way around it is a hidden variable that is given all players--this will make sure you never have to specify a player who is online. I used one for my days of the week counter
I feel like there must be an easier way to do this, though. Can't you just name the teams Orange and Red and display that?
I just checked in NBT Edit, and none of the items you mention have potion effects tags. The chance to poison/regen/etc. is build into the code in some other way, I assume. I've never heard of food with potion effects and my bet is that it's not possible.
Here's a good way to spare yourself some facepalming; if you press tab in the middle of typing a command, it will auto-complete. If it doesn't, you've probably typed something wrong.
Added both to the main post. The worlds have the objectives and display set up, but still require that you place the daylight sensor and add the cake to the exposed dropper. (Items are in the chest.)
This is a system intended to be put into the spawn chunks of any Minecraft world, custom or vanilla. What it does is tests if players go to sleep in a reasonable amount of time (roughly 3 real minutes after sunset). In the morning, it gives either positive or negative status effects at random based on players' exhaustion levels.
At 19x16x9, it's a little bulky, but it adds a useful mechanic for any survival style map and can easily be customized!
Here are the default settings:
Exhaustion level required / status effect
0 / Haste II
0 / Jump Boost I
-1 / Healing I
-1 / Speed I
-1 / Strength I
-3 / Haste IV
-2 / Resistance I
-2 / Water Breathing -2/ Jump Boost II -3/ Speed II
-3 / Healing II
-4 / Strength II
-4 / Resistance II
-5 / Fire Res
-5 / Regen I
Exhaustion level required / status effect
3 / Damage I
5 / Damage II
1 / Mining Fatigue II
3 / Mining Fatigue IV
4 / Hunger
1 / Slow I
3 / Slow II
1 / Weakness I
2 / Weakness II
2 / Nausea (Max 30 secs)
5 / Wither I (35 seconds)
4 / Poison (30 seconds)
2 / Blindness (45 seconds)
All status effects have a 1 in 4 chance of being given to one random player with the appropriate exhaustion level every morning. If playing with more than 2-3 players, I recommend increasing the odds to 1 in 3.
If the player stays up past the 3 minute mark (1.5 minutes after the warning message) and then sleeps, they will gain one point of exhaustion. If the player stays up at least an additional 3 minutes, they gain two points of exhaustion.
If a player goes to bed before the warning and has a positive level of exhaustion, it will be reset to zero. If the player has 0 or lower and goes to bed within 3 minutes, they lose one point of exhaustion.
Because of how Minecraft works, the system does not function normally if the only player in the world is in the Nether or The End. From my limited testing, it appears to remain suspended until the player returns to the normal world. Please let me know if you get other unusual functioning!
The first and most helpful thing to know is that every command block is labeled with what it does.
To change chance of a status effect occurring, you need to change the contents of the droppers underneath the hoppers. Adding more varieties of stackable items will lower the chance, and removing them will increase it (the signal is strong enough only when the cake/non-stackable item is chosen).
The status effect command blocks are set to target a random player. You could alter this to all players, or players on a certain team/with a certain level, etc.
The length of time required before a player is penalized for sleeping can be changed by altering how the top command blocks deal with the objective "late", or by adding/removing cobwebs from the item elevator setup.
I hope you guys enjoy the system. If you have any questions/comments, let me know!
I was wondering if anyone knows how to edit how close the player has to be before a mob spawner starts spawning. Any help on this subject would be greatly appreciated
You can do this with MCEdit and the Set Spawner Properties filter. You can also do it with NBT Explorer -- the tag you want is called "SpawnRange" and is measured in blocks.
0
I feel like there must be an easier way to do this, though. Can't you just name the teams Orange and Red and display that?
0
0
Click "Edit" at the bottom of your post, and then click on "Use Full Editor". You'll get a lot more replies that way.
0
1
0
0
There's no way to make a single command block give out 3 or 4 different items, but you can place them next to each other to receive power.
1
Yes. If night isn't skipped, all players get exhausted. Don't play with people who will screw you over.
0
These two things can't be done with vanilla MC -- you'll need to find a mod-maker for that.
0
0
Thank you very much.
0
Added both to the main post. The worlds have the objectives and display set up, but still require that you place the daylight sensor and add the cake to the exposed dropper. (Items are in the chest.)
0
I certainly could! Did you want a superflat world for testing or just a normal world to play in?
1
This is a system intended to be put into the spawn chunks of any Minecraft world, custom or vanilla. What it does is tests if players go to sleep in a reasonable amount of time (roughly 3 real minutes after sunset). In the morning, it gives either positive or negative status effects at random based on players' exhaustion levels.
At 19x16x9, it's a little bulky, but it adds a useful mechanic for any survival style map and can easily be customized!
Here are the default settings:
Exhaustion level required / status effect
0 / Haste II
0 / Jump Boost I
-1 / Healing I
-1 / Speed I
-1 / Strength I
-3 / Haste IV
-2 / Resistance I
-2 / Water Breathing
-2/ Jump Boost II
-3/ Speed II
-3 / Healing II
-4 / Strength II
-4 / Resistance II
-5 / Fire Res
-5 / Regen I
3 / Damage I
5 / Damage II
1 / Mining Fatigue II
3 / Mining Fatigue IV
4 / Hunger
1 / Slow I
3 / Slow II
1 / Weakness I
2 / Weakness II
2 / Nausea (Max 30 secs)
5 / Wither I (35 seconds)
4 / Poison (30 seconds)
2 / Blindness (45 seconds)
All status effects have a 1 in 4 chance of being given to one random player with the appropriate exhaustion level every morning. If playing with more than 2-3 players, I recommend increasing the odds to 1 in 3.
If the player stays up past the 3 minute mark (1.5 minutes after the warning message) and then sleeps, they will gain one point of exhaustion. If the player stays up at least an additional 3 minutes, they gain two points of exhaustion.
If a player goes to bed before the warning and has a positive level of exhaustion, it will be reset to zero. If the player has 0 or lower and goes to bed within 3 minutes, they lose one point of exhaustion.
Because of how Minecraft works, the system does not function normally if the only player in the world is in the Nether or The End. From my limited testing, it appears to remain suspended until the player returns to the normal world. Please let me know if you get other unusual functioning!
To change chance of a status effect occurring, you need to change the contents of the droppers underneath the hoppers. Adding more varieties of stackable items will lower the chance, and removing them will increase it (the signal is strong enough only when the cake/non-stackable item is chosen).
The status effect command blocks are set to target a random player. You could alter this to all players, or players on a certain team/with a certain level, etc.
The length of time required before a player is penalized for sleeping can be changed by altering how the top command blocks deal with the objective "late", or by adding/removing cobwebs from the item elevator setup.
I hope you guys enjoy the system. If you have any questions/comments, let me know!
0
You can do this with MCEdit and the Set Spawner Properties filter. You can also do it with NBT Explorer -- the tag you want is called "SpawnRange" and is measured in blocks.