The Meaning of Life, the Universe, and Everything.
Join Date:
2/20/2019
Posts:
46
Member Details
I'm working on a command that makes it so when you mine a mob spawner it gives you a mob spawner (with the give command) but for some reason when I mine the spawner it doesn't give me anything I also tested it out with the say command and nothing happened.
my command is: /execute as @a[scores={mob=1..}] run give @a[scores={mob=1..}] spawner{SpawnData:{id:zombie}}
the scoreboard works perfectly fine it even goes up whenever you mine a mob spawner.
I also tried resetting my score and making sure the score "mob" was set to minecraft.mined:minecraft.spawner.
If anyone could tell me how to fix this that would be awesome!.
and to detect which spawner the player mined, you would have to run a command like this on repeat:
/execute as @a at @s if block ^ ^ ^1 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie
/execute as @a at @s if block ^ ^ ^2 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie
/execute as @a at @s if block ^ ^ ^3 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie
/execute as @a at @s if block ^ ^ ^4 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie
/execute as @a at @s if block ^ ^ ^5 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie
/give @a[tag=spawner_zombie,scores={mob=1..}] minecraft:spawner{BlockEntityTag:{SpawnData:{id:"zombie"},SpawnPotentials:[{Entity:{id:"minecraft:zombie"},Weight:1}]}}
/tag @a[tag=spawner_zombie] remove spawner_zombie
^ haven't tested this but the idea is there. The first 5 commands just test if there is a zombie spawner in front of the player and assigns a tag to the player if there is. This way you know which spawner to give to the player.
The Meaning of Life, the Universe, and Everything.
Join Date:
2/20/2019
Posts:
46
Member Details
Thanks for the awesome idea! i'll have to give it a try!. I mine the spawner but nothing happens I even tried it with /effect and /say command and it didn't seem to make a difference i just mined it and it didn't do anything my command i'm currently using is: /execute if entity @a[scores={mob=1..}] run effect give @a[scores={mob=1..}] minecraft:regeneration 9 7.
Thanks for the awesome idea! i'll have to give it a try!. I mine the spawner but nothing happens I even tried it with /effect and /say command and it didn't seem to make a difference i just mined it and it didn't do anything my command i'm currently using is: /execute if entity @a[scores={mob=1..}] run effect give @a[scores={mob=1..}] minecraft:regeneration 9 7.
I think it's your objective. Make sure it is set up properly and perform a quick test
I'm working on a command that makes it so when you mine a mob spawner it gives you a mob spawner (with the give command) but for some reason when I mine the spawner it doesn't give me anything I also tested it out with the say command and nothing happened.
my command is: /execute as @a[scores={mob=1..}] run give @a[scores={mob=1..}] spawner{SpawnData:{id:zombie}}
the scoreboard works perfectly fine it even goes up whenever you mine a mob spawner.
I also tried resetting my score and making sure the score "mob" was set to minecraft.mined:minecraft.spawner.
If anyone could tell me how to fix this that would be awesome!.
i think thre is no way to spawn a specifc spawner with one command at this time.
hope i´m wrong ;-( , im very inrerested on that.
It seems to be an issue with testing for the player with a certain score. 1.. means "greater-than OR equal-to" right?
no, testing score = or >= or <= is ok.
but u cant spawn a SPECIFIC spawner.. the only way is to put an spawnegg in to it.
im not sure but think so
if u want a datapck i got one to get specific spawner with silk touch.
pn me
Pretty much any command even /say and stuff like that won't work with the execute command when testing for scores
idk if this is just a bug or if i'm just doing the execute command wrong.
The objective should be set up like this:
and the command to give you the spawner:
and to detect which spawner the player mined, you would have to run a command like this on repeat:
^ haven't tested this but the idea is there. The first 5 commands just test if there is a zombie spawner in front of the player and assigns a tag to the player if there is. This way you know which spawner to give to the player.
The spawner command is above ^, and here is the command for a custom spawn egg:
Command block engineer // Developer // #TeamTrees
Thanks for the awesome idea! i'll have to give it a try!. I mine the spawner but nothing happens I even tried it with /effect and /say command and it didn't seem to make a difference i just mined it and it didn't do anything my command i'm currently using is: /execute if entity @a[scores={mob=1..}] run effect give @a[scores={mob=1..}] minecraft:regeneration 9 7.
I think it's your objective. Make sure it is set up properly and perform a quick test
Command block engineer // Developer // #TeamTrees
"MJWplayz has one [mob]" after I mine the spawner but the command after "run" doesn't work.
That's weird. Maybe your command block froze, try un-powering and re-powering your command block to reset it. If that doesn't work, try this:
Command block engineer // Developer // #TeamTrees
It works now Thanks a lot!!.
guess the command block got glitched and I had to replace it.
/execute as @a at @s if block ^ ^ ^1 minecraft:spawner{SpawnData:{id:"minecraft:zombie"}} run ...
dosent work only for ME?
edit..
/execute as @a at @s anchored eyes if block ^ ^ ^1 minecraft:spawner run..
worked nice got functionaly datapack to mine and get spawners
zombie
skeleton
spider
cavespider
blaze
THANK YOU for that nice idea and help ;-)