1
Small help issues
So I'm trying to make a kind of command that only affects people not in a certain game mode, and I thought @a[m=!1] would affect only people not in creative, but it seems to not be working right, am I doing something wrong?
Also I am trying to test for a player holding a player skull (type 3 of the 0-4) and I can test for it named and the skull in general when they hold it, but when I try to also look for "damage:3" so it's only the player skull possible, it just seems to not accept it, what is the proper way to test for damage on a skull when someone is holding it?
Thank you for any help you can give in advance, it is greatly appreciated.
Also I am trying to test for a player holding a player skull (type 3 of the 0-4) and I can test for it named and the skull in general when they hold it, but when I try to also look for "damage:3" so it's only the player skull possible, it just seems to not accept it, what is the proper way to test for damage on a skull when someone is holding it?
Thank you for any help you can give in advance, it is greatly appreciated.
Create an account or sign in to comment.
13
1
or you could just use creative, c survival, s and adventure, a instead of the numbers
1
Jmal116
I must say, I've never really payed that much attention to the game log. I'm assuming you're talking about the log that pops up in the launcher? In any case, I know they recently added the gamerule logAdminCommands, which might explain it. Try setting it to false, and see if the commands still show up in the log.
Thanks, I just figured that out actually, haha, it's a good add on, thanks again!
1
hokage3211
Also have you noticed that in worlds before a recent udpate (I assume), command blocks filling blocks output to the log of the game even with command block output off, but now they don't, I'm just wondering if you know anything about this because it seems to output in one world i have but not another (the latter being a recent world), so I was wondering if that was true
I must say, I've never really payed that much attention to the game log. I'm assuming you're talking about the log that pops up in the launcher? In any case, I know they recently added the gamerule logAdminCommands, which might explain it. Try setting it to false, and see if the commands still show up in the log.
1
Jmal116
The wiki's got huge lists of all the tags, more than you could ever possibly want. But in those list are the types of each tag as well, which makes it pretty useful:
For blocks, entities, and tile entities: http://minecraft.gamepedia.com/Chunk_format
For players, items, potions, etc.: http://minecraft.gamepedia.com/Player.dat_format
Thanks, this should help in the future when I am trying to figure out what went wrong.
Also have you noticed that in worlds before a recent udpate (I assume), command blocks filling blocks output to the log of the game even with command block output off, but now they don't, I'm just wondering if you know anything about this because it seems to output in one world i have but not another (the latter being a recent world), so I was wondering if that was true
1
So.. /kill @e [type=!Player] thats it
1
I had luck with this data:
Obviously if you're trying to avoid comparators you won't want to put it in a /testfor command, but I'm lazy.
testfor @a {SelectedItem:{id:"minecraft:skull",Count:1b,Damage:3s}}
Obviously if you're trying to avoid comparators you won't want to put it in a /testfor command, but I'm lazy.
1
Actually for the thing I am using it for a comarator works, thank you very much, this works, also what does exactly "b, s, and f" mean next to numbers?
1
Those are the tag types. b stands for byte, s for short, and f for float. There are sometimes weird bugs where you have to include them, and sometimes you don't (There's an actual way to tell, but I can't remember what it is right now). If I ever can't get something to work, I just try adding them to see if that fixes the problem. In this case, it did.
The wiki's got huge lists of all the tags, more than you could ever possibly want. But in those list are the types of each tag as well, which makes it pretty useful:
For blocks, entities, and tile entities: http://minecraft.gamepedia.com/Chunk_format
For players, items, potions, etc.: http://minecraft.gamepedia.com/Player.dat_format
The wiki's got huge lists of all the tags, more than you could ever possibly want. But in those list are the types of each tag as well, which makes it pretty useful:
For blocks, entities, and tile entities: http://minecraft.gamepedia.com/Chunk_format
For players, items, potions, etc.: http://minecraft.gamepedia.com/Player.dat_format
1
If you are just testing for a player skull regardless of owner you can use a fill clock with a command to clear "0" skulls with a comparator as the output. Now you only need data values, no complicated data tags.
1
It's != not =!. It's a common mistake but easy to remember
You say 'It's not equal'(!=) not 'It's equal not'(=!)
You say 'It's not equal'(!=) not 'It's equal not'(=!)
1
It actually is =! (at least in minecraft), however you cannot use it with numbers, only strings like player names or team names. So it probably would be easiest to do what TheArchitect said and use multiple commands.
As for the skull, I'd have to brush up on how testing for player skulls works :/ The only tip I can really give you at this point is to try putting an 's' after your Damage tag (since Damage is a short type tag), making it "Damage:3s". Are you trying to test for a specific player's skull, or just a player skull in general?
As for the skull, I'd have to brush up on how testing for player skulls works :/ The only tip I can really give you at this point is to try putting an 's' after your Damage tag (since Damage is a short type tag), making it "Damage:3s". Are you trying to test for a specific player's skull, or just a player skull in general?
1
I am trying to just test for the skull variant 3, which happens to be a player skull, not any specific skin on it or anything.
I kindof prefer data tags because /clear means you have to attach a comparator and then it might not work under stressful conditions when exact timing is needed
TheArchitect_95If you are just testing for a player skull regardless of owner you can use a fill clock with a command to clear "0" skulls with a comparator as the output. Now you only need data values, no complicated data tags.
I kindof prefer data tags because /clear means you have to attach a comparator and then it might not work under stressful conditions when exact timing is needed
1
I think you need a capital D in damage. Regarding the first one, that looks correct, if it doesn't work you could try several commands where m=0, 2 and 3 and filter out creative that way.