You probably can't. Not sure though.The workaround for this is to put a comparator near the command block, connect it to an inverter, connect it to whatever output it's going to be.
That way, it actually testfors a mob that's alive but when it dies, the comparator connected to it deactivates thus turning on the inverter and sending a redstone signal.
You probably can't. Not sure though.The workaround for this is to put a comparator near the command block, connect it to an inverter, connect it to whatever output it's going to be.
That way, it actually testfors a mob that's alive but when it dies, the comparator connected to it deactivates thus turning on the inverter and sending a redstone signal.
You actually can in the latest snapshot, one of the specifiers just has to be DeathTime. This is the number of ticks the entity had been dead for. P.S. Check out this page for all of the NBT tags: http://minecraft.gamepedia.com/Chunk_format#Entity_Format
You actually can in the latest snapshot, one of the specifiers just has to be DeathTime. This is the number of ticks the entity had been dead for. P.S. Check out this page for all of the NBT tags: http://minecraft.gam...t#Entity_Format
try /testfor @e[type=mob {CustomName:name}, DeathTime: 1] If that doesn't work, try using the invertor, like Also, your CustomName is incorrect: /testfor @e[name=name, DeathTime:1] Try monkeying around with spacing
You actually can in the latest snapshot, one of the specifiers just has to be DeathTime. This is the number of ticks the entity had been dead for. P.S. Check out this page for all of the NBT tags: http://minecraft.gamepedia.com/Chunk_format#Entity_Format
try /testfor @e[type=mob {CustomName:name}, DeathTime: 1] If that doesn't work, try using the invertor, like Also, your CustomName is incorrect: /testfor @e[name=name, DeathTime:1] Try monkeying around with spacing
Firstly, you cannot insert raw NBT data into player/entity selectors. You must place them in the "dataTags" for applicable commands. For /testfor:
However, the above is essentially useless. When a mob dies, it becomes untargetable, so tracking a "DeathTime" tag won't do anything. As well, the "DeathTime" tag increases by 1 per tick, which is too fast for a comparator to accept a signal from when using the /testfor command. The solution to that particular issue is to use the /scoreboard's dataTag functionality, but that won't matter in this case, as dead mobs cannot be targeted during its death phase.
The summoned item is riding a creeper, and it cannot be picked up nor will it ever despawn. In order to detect when the creeper dies, you'll instead be checking the item entity for the "Riding" tag. To accomplish this, you'll need the following mechanism:
2. This increases the score of specific item entities so that it may be detectable. In this case, all item entities that are riding a creeper will have a minimum score of 1.
3. Finally, this one will reduce the score of item entities. The item entity, when riding a creeper, will be kept above 1 at all times. Once the creeper dies, it will not have its score sustained, and is thus reduced to 0. You would then be testing for items with a score of 0 to indicate a dead creeper.
Otherwise there is no way apart from inverting the signal, which would be much easier than the above if you're only intending on tracking a single mob. Inverting won't work if you need to track dead mobs on an individual basis, which is what the above is intending to do.
/testfor @e[type=mob {CustomName:name}]
what am i missing
That way, it actually testfors a mob that's alive but when it dies, the comparator connected to it deactivates thus turning on the inverter and sending a redstone signal.
Also, your CustomName is incorrect: /testfor @e[name=name, DeathTime:1] Try monkeying around with spacing
Firstly, you cannot insert raw NBT data into player/entity selectors. You must place them in the "dataTags" for applicable commands. For /testfor:
The resulting command:
However, the above is essentially useless. When a mob dies, it becomes untargetable, so tracking a "DeathTime" tag won't do anything. As well, the "DeathTime" tag increases by 1 per tick, which is too fast for a comparator to accept a signal from when using the /testfor command. The solution to that particular issue is to use the /scoreboard's dataTag functionality, but that won't matter in this case, as dead mobs cannot be targeted during its death phase.
Instead, you can use a little Riding trick:
The summoned item is riding a creeper, and it cannot be picked up nor will it ever despawn. In order to detect when the creeper dies, you'll instead be checking the item entity for the "Riding" tag. To accomplish this, you'll need the following mechanism:
1. This is the clock, running at 20t/s.
2. This increases the score of specific item entities so that it may be detectable. In this case, all item entities that are riding a creeper will have a minimum score of 1.
3. Finally, this one will reduce the score of item entities. The item entity, when riding a creeper, will be kept above 1 at all times. Once the creeper dies, it will not have its score sustained, and is thus reduced to 0. You would then be testing for items with a score of 0 to indicate a dead creeper.
And for tracking:
Otherwise there is no way apart from inverting the signal, which would be much easier than the above if you're only intending on tracking a single mob. Inverting won't work if you need to track dead mobs on an individual basis, which is what the above is intending to do.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
The question was to be able to target a dead mob, not when the player kills one.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
You could also give the mob a specific drop that could be tested for then removed quickly.
I would also do this but I would suggest using bedrock or end portal frames as the drop
I looked at my old signature and cringed so much that I removed it