@a[c=1] has a different behavior than @r, though, of course. The former selects the nearest player (same as @p), while the latter selects a random player.
- Registered Member
Member for 2 years, 7 months, and 26 days
Last active Fri, Feb, 24 2017 08:11:25
- 0 Followers
- 5 Total Posts
- 0 Thanks
Aug 28, 2016Posted in: Redstone Discussion and Mechanisms
That always happens when /scoreboard can't find any players matching the selector and you're only targeting one player (i.e., you use @p or @r*). So there are no players with a maximum Test score of 0 and a maximum Test2 score of 0.
It's not a very well worded error message. You don't get an error if you target more than one player/entity because, when the selector can target more than one entity (@a or @e**), the selector is parsed before the command, and then the command is run for each entity selected. If 0 are found, then the command is run 0 times. If the /scoreboard command doesn't run, it doesn't produce an error message.
* Or you use @a[c=1] or @e[c=1].
** Or @p or @r with a "c" value greater than 1***.
*** Or a "c" value less than -1. (Negative c values target the entities farthest away from where the command is being executed.)
Aug 28, 2016Posted in: Mapping and Modding Tutorials
Yeah, I meant the mods. On second thought, I guess it would work if everyone who logged into the Realms server had the "mod" installed, right? Or is it required server-side as well?
I assumed, since the directory for these files is under "client", that it's implemented client-side.
Aug 27, 2016Posted in: Mapping and Modding Tutorials
This is cool. I'm assuming the custom block can be given a model and textures with a resource pack? (I'm not very familiar with those.)
The only downside with this is that it can't be contained within a world directory (so it can't, e.g., be used on Minecraft Realms).
Aug 27, 2016tech_hutch posted a message on [1.8+] Disable Sprinting for Adventure Maps [Vanilla]Posted in: Mapping and Modding Tutorials
Nice solution. I also needed to disable sprinting (though only in certain situations), but instead of giving the player slowness, I just teleport them to where they are already (with /tp <target player> @p). That magically slows the player down, somehow. It makes sprinting slower than walking, although it also makes it a little janky. I wanted to make sprinting the same as walking, but at least it doesn't completely disable movement.
That's how I'm doing it right now, anyway. I might consider switching to instead using just enough slowness to make sprinting the same or less speed as walking.
By the way, you can reduce your method to two command blocks by doing the test in the same block you apply the effect:
/effect @a[score_Running_min=1] 2 1 255 true /scoreboard players set @a Running 0
This also solves the problem of your commands only running for the player nearest the blocks because they run for all players. If there was a player sprinting, but there was a player nearer to the command blocks who was not sprinting, the player who's nearer would be penalized with not moving instead of the sprinting player because you only use @p in your effect application, which will target the nearest player to the blocks with no regard to who was actually sprinting. (Depending on the number of players and the layout of the command blocks in your map, this might not be a problem, but…I solved it anyway ).
- To post a comment, please login or register a new account.