The same rules apply to Monster Spawners as to the natural spawning of the mob in question, with two exceptions:
- Ordinarily, hostile mobs will never spawn next to the player, but with spawners they can.
- Natural spawns require ground underneath the mob, but Monster Spawners can create monsters in midair.
It is also important to understand the effect of light level: what is relevant is not the light at the spawner but the light at the location where the mob spawns, so putting a torch on the spawner is just a way to center the light, not inherently good — and is in fact inadequate to light up the full spawning range to level 8, though it happens to be sufficient for many natural dungeons. The actual requirement for safety is that the full spawning area (8×8 × 3 high box centered on the spawner's low-coordinate corner) is sufficiently lit (or does not have valid locations to spawn, e.g. is filled solid).
In your case, where you have two spawners right next to each other, there is no way to spawn just the skeletons except by lighting or filling up with blocks the entire spawn volume of the cave spider spawner, leaving you with just a thin slice of skeleton spawner volume (which will therefore have lower spawning rates).
Another possibility would be to construct a sorting system which separates the skeletons from the cave spiders, but I don't know of a particular design to suggest. Cave spiders are particularly difficult to handle because of their small size and ability to climb.
The wiki is technically correct: cave spiders can be pacified by light, just like regular spiders.
If you decompile Minecraft and deobfuscate its source code using Minecraft Coder Pack (MCP), there are two classes, EntitySpider
and EntityCaveSpider
, which govern the behavior of spiders and cave spiders, respectively.
EntityCaveSpider
is subclass of EntitySpider
: in layman's terms, this means that unless otherwise specified, cave spiders inherit all the behaviors and properties of regular spiders.
EntitySpider
has a method called findPlayerToAttack()
: in it, there's a conditional that checks the light level of the area to determine whether it should be hostile:
float f = getBrightness(1.0F);
if (f < 0.5F) {
double d = 16D;
return worldObj.getClosestVulnerablePlayerToEntity(this, d);
}
else {
return null;
}
This method is not overridden in EntityCaveSpider
, meaning cave spiders use the same conditional and thus, can be pacified by light like regular spiders can be.
To confirm that cave spiders are indeed passive at high light levels, you can do the following:
- Create a new world. Set the Game Mode to Creative and under More world options..., set the World Type to Superflat.
- Open the inventory, and add the Spawn Cave Spider egg to your hot bar.
- Use the egg to create a bunch of cave spiders.
- Open the chat bar by pressing T.
Type the following and press enter:
/gamemode 0
This will set your game to survival mode: if cave spiders weren't pacified, they'd attack you on sight. However, they shouldn't do that:
The issue is likely that once a mob has found a player to attack, it does not give up the target until it's either killed, the target has left its aggro radius, or it fails a 1:100 roll to drop aggro when light levels are high enough.
Best Answer
Lava. It will kill the spiders, destroy the webs and spawners too, and potentially make it bright enough to stop them being hostile.