1

Small help issues

hokage3211 4/11/15 2:14 am
619
4/13/2015 10:49 pm
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.
Posted by
hokage3211
Level 53 : Grandmaster Nerd Programmer
52

  Have something to say?

JoinSign in

13

Veritas025
04/13/2015 10:49 pm
Level 55 : Grandmaster System
or you could just use creative, c survival, s and adventure, a instead of the numbers
1
hokage3211
04/13/2015 10:39 pm
Level 53 : Grandmaster Nerd Programmer
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
Jmal116
04/13/2015 4:07 pm
Level 34 : Artisan System
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
hokage3211
04/13/2015 11:36 am
Level 53 : Grandmaster Nerd Programmer
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
inPigglet
04/12/2015 9:10 pm
Level 14 : Journeyman Pig
So.. /kill @e [type=!Player] thats it
1
Jmal116
04/12/2015 6:19 pm
Level 34 : Artisan System
I had luck with this data: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
hokage3211
04/12/2015 8:36 pm
Level 53 : Grandmaster Nerd Programmer
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
Jmal116
04/12/2015 9:12 pm
Level 34 : Artisan System
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
1
TheArchitect_95
04/11/2015 12:59 pm
Level 32 : Artisan Architect
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
SleepyDog
04/11/2015 7:16 am
Level 40 : Master Button Pusher
It's != not =!. It's a common mistake but easy to remember

You say 'It's not equal'(!=) not 'It's equal not'(=!)
1
Jmal116
04/11/2015 9:43 am
Level 34 : Artisan System
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?
1
hokage3211
04/11/2015 9:38 pm
Level 53 : Grandmaster Nerd Programmer
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.

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
TheArchitect_95
04/11/2015 6:42 am
Level 32 : Artisan Architect
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.
1

Welcome