How to make a mob spawner that spawns mobs at a specific coordinate?
-
I have noticed this method used in older maps, I am playing in 1.17.1, and I was wondering if there is any way to make a mob spawner spawn the entity, in my case, a piece of smooth stone, at a specific coordinate.
The reason I want to know this is for the sake of Redstone, I would like to summon a single piece of stone on a pressure plate by using a mob spawner.
-
I tested to change a spawner to spawn stone as an item but it didn't seem to spawn anything.
However, you can use the
execute
command to test when a player enters a specific area:execute if entity @a[x=-61,y=56,z=65,dx=2,dy=1,dz=2] run "Your command"
You could then remove the
stone pressure plate
and use this command:setblock x y z redstone_block
or you could also summon the wanted stone:
/summon item ~ ~ ~ {Item:{id:"stone",Count:1}}
Whitin
@a[x=-61,y=56,z=65,dx=2,dy=1,dz=2]
you would place your ownx y z
and thedx dy dz
is how far it tests for.this:
execute if entity @a[x=-61,y=56,z=65,dx=2,dy=1,dz=2]
Will test for all players at a cube from
-61 56 65
to-59 57 67