Relating to this topic. How do I detect a squid with a custom name? I've got /execute @e[type=Item,score_tileType_min=4,score_tileType=4,c=1] ~ ~ ~ give @p spawn_egg 1 94 {display:{Name:"Springtrap"}} and testfor @e[type=Squid] {display:{Name:"Springtrap"}} on my clock but it doesn't work. How would this work?
P.S. If you could add how to make it glow like an enchanted egg that would be awesome!!
Just use the selector @e[type=Squid,name=Springtrap]
You can add an useless enchantment, like Unbreaking :
And squids, like other entities, don't have a display name, that tag is exclusive to items, they have a CustomName. You could detect that using {CustomName:"Springtrap"} but you don't need to, since you can specify the name in the selector like so
How would I detect an armorstand? I've got /execute @e[type=Squid,name=Springtrap] ~ ~ ~ summon ArmorStand ~ ~ ~ {display:{Name:"Springtrap"},Invisible:1,NoGravity:1} and /execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ setblock ~ ~2 ~ dirt but it won't detect it. What is going on???
How would I detect an armorstand? I've got /execute @e[type=Squid,name=Springtrap] ~ ~ ~ summon ArmorStand ~ ~ ~ {display:{Name:"Springtrap"},Invisible:1,NoGravity:1} and /execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ setblock ~ ~2 ~ dirt but it won't detect it. What is going on???
First of all, do not /tp it to 0 0 0. Tp it to ~ -200 ~. It gets killed instantly that way. Second, you are trying to name it like it is an item, for namable entities you need to use the CustomName tag:
First of all, do not /tp it to 0 0 0. Tp it to ~ -200 ~. It gets killed instantly that way. Second, you are trying to name it like it is an item, for namable entities you need to use the CustomName tag:
Thanks. That worked but I have another problem in my project. I'm trying to get the armour stand to detect a creeper the the position that the armour stand is in. I've got execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ testfor @e[type=Creeper,r=0] but the comparator I have pointing out of the command block that executing that command isn't getting a signal. What's wrong?
Thanks. That worked but I have another problem in my project. I'm trying to get the armour stand to detect a creeper the the position that the armour stand is in. I've got execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ testfor @e[type=Creeper,r=0] but the comparator I have pointing out of the command block that executing that command isn't getting a signal. What's wrong?
Well a few things here, with a radius of 0, the Creeper needs to be in the exact position of the ArmorStand for this to detect it. Second, you're using /testfor again. Instead mark the creeper with a scoreboard objective and target it that way through other commands. If you need a redstone signal then setblock a redstone_block.
Well a few things here, with a radius of 0, the Creeper needs to be in the exact position of the ArmorStand for this to detect it. Second, you're using /testfor again. Instead mark the creeper with a scoreboard objective and target it that way through other commands. If you need a redstone signal then setblock a redstone_block.
And how would I do that with a scoreboard objective? (I'm not that good with scoreboards)
/execute @e[type=Creeper,score_OBJECTIVE_min=1] ~ ~ ~ say hi
Now as I was saying before, unless the creeper is at the exact same position as the armor stand, it will not find it, so you may need to increase the radius to r=1.
/execute @e[type=Creeper,score_OBJECTIVE_min=1] ~ ~ ~ say hi
Now as I was saying before, unless the creeper is at the exact same position as the armor stand, it will not find it, so you may need to increase the radius to r=1.
Can I use that on a player like so the Armour Stand detects the player not the creeper?
EDIT: Scratch that. I've done it. Now how do I make it so when the player is NOT in a 1 block radius of the armour stand it sets my score on detectPlayer to 0. When the player is in that radius it sets the players score to 1 on detectPlayer but I want that and that but inverted. How do I do it?
Ok. The main thing is when you step on the pressure plate a creeper with a fuse of 0 spawns and blows up instantly. I need the gamerule mobGriefing to be set to false when the creeper explodes and once he explodes the gamerule be set back to true. How do I do it?
Sorry about that.. So to do this, you could do a few things, either activate a circuit that will disable mabGriefing then wait and re-enable it, or you could use the scoreboard:
Just use the selector @e[type=Squid,name=Springtrap]
You can add an useless enchantment, like Unbreaking :
/execute @e[type=Item,score_tileType_min=4,score_tileType=4,c=1] ~ ~ ~ give @p spawn_egg 1 94 {ench:[{id:34,lvl:1}],HideFlags:1,display:{Name:"Springtrap"}}
Edit : I didn't see the second page
Thankyou! That worked!
You're right. I need to use the /execute command instead of the /testfor command anyway. Thanks nigathan! You've helped me a lot on this forum.
How would I get the squid to not drop ink sacks? Thanks
Thanks. I did that but to 0 0 0.
How would I detect an armorstand? I've got /execute @e[type=Squid,name=Springtrap] ~ ~ ~ summon ArmorStand ~ ~ ~ {display:{Name:"Springtrap"},Invisible:1,NoGravity:1} and /execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ setblock ~ ~2 ~ dirt but it won't detect it. What is going on???
First of all, do not /tp it to 0 0 0. Tp it to ~ -200 ~. It gets killed instantly that way. Second, you are trying to name it like it is an item, for namable entities you need to use the CustomName tag:
/execute @e[type=Squid,name=Springtrap] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:"Springtrap",Invisible:1,NoGravity:1}
Thanks. That worked but I have another problem in my project. I'm trying to get the armour stand to detect a creeper the the position that the armour stand is in. I've got execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ testfor @e[type=Creeper,r=0] but the comparator I have pointing out of the command block that executing that command isn't getting a signal. What's wrong?
Well a few things here, with a radius of 0, the Creeper needs to be in the exact position of the ArmorStand for this to detect it. Second, you're using /testfor again. Instead mark the creeper with a scoreboard objective and target it that way through other commands. If you need a redstone signal then setblock a redstone_block.
And how would I do that with a scoreboard objective? (I'm not that good with scoreboards)
Well first create the objective by typing this into chat:
/scoreboard objectives add OBJECTIVE dummy
Now use:
/execute @e[type=ArmorStand,name=Springtrap] ~ ~ ~ scoreboard players set @e[type=Creeper,r=0] OBJECTIVE 1
/execute @e[type=Creeper,score_OBJECTIVE_min=1] ~ ~ ~ say hi
Now as I was saying before, unless the creeper is at the exact same position as the armor stand, it will not find it, so you may need to increase the radius to r=1.
Can I use that on a player like so the Armour Stand detects the player not the creeper?
EDIT: Scratch that. I've done it. Now how do I make it so when the player is NOT in a 1 block radius of the armour stand it sets my score on detectPlayer to 0. When the player is in that radius it sets the players score to 1 on detectPlayer but I want that and that but inverted. How do I do it?
Simply set the score to 0 by default, before the test.
That doesn't work. I need the score to be set to 0 when the player is NOT in the 1 block radius.
Ok. The main thing is when you step on the pressure plate a creeper with a fuse of 0 spawns and blows up instantly. I need the gamerule mobGriefing to be set to false when the creeper explodes and once he explodes the gamerule be set back to true. How do I do it?
Pretty sure you just answered your own question. Sorry I am fairly impaired and should not be answering any questions atm....
What do you mean?
Sorry about that.. So to do this, you could do a few things, either activate a circuit that will disable mabGriefing then wait and re-enable it, or you could use the scoreboard:
/gamerule mobGriefing false
/execute @p[score_mobGriefing_min=1] ~ ~ ~ gamerule mobGriefing true
/scoreboard players reset @p[score_mobGriefing_min=1] mobGriefing
/scoreboard players set @p mobGriefing 1
Edit: lol "mabGriefing"
I solved it. I'm fine now.