Rain arrows in random positions within bounds? [duplicate]
setblock ~ ~1 ~ mob_spawner 0 replace {
SpawnCount:1,
SpawnRange:16,
Delay:-1,
MinSpawnDelay:1,
MaxSpawnDelay:1,
MaxNearbyEntities:32767,
RequiredPlayerRange:32767,
SpawnPotentials:[
{
Type:"Arrow",
Weight:1,
Properties:{
Motion:[0.0,-1.0,0.0]
}
}
]
}
This will create a MobSpawner, spawning falling arrows at random in a square around it. The square is 3 high and 2*SpawnRange wide. On the current settings it will spawn one arrow per tick, you can increase SpawnCount to have more, or Min/MaxSpawnDelay to have less.
Of course this leaves us with a very derpy spawner up in the sky. The next step is to put it underground, and add a /fill clock that triggers a command block, teleporting arrows in the spawn square up in the air :
tp @e[type=arrow,x=...,y=...,z=...,dx=...,dy=...,dz=...] ~ 128 ~