4

I was watching a live stream of someone creating a railway through the Nether when it was suggested to him to prevent zombie pigmen from spawning on his rails by placing button on the space above the rails (either attached to the ceiling or the wall).

Having never seen buttons being used for that purpose I started researching it a bit. Buttons do count as transparent blocks, but mobs can spawn on pressure plates, so perhaps redstone components are an exception. The relevant question on this topic on Arqade did not list them specifically in the answers (see Is there a way to keep Zombie Pigmen off of minecart tracks in the Nether?).

1
  • But why would zombie pigmen create a problem? You can easily push them aside.
    – sensiwoo
    Commented Nov 3, 2015 at 1:24

2 Answers 2

9

No, buttons do not affect mob spawning

The commenter probably misremembered that mobs cannot spawn if there is no air block. This is just false.

Mobs can spawn in blocks without a hitbox (and carpets) without any issues. They could so for quite a while now (maybe even always). Note that prior to 1.8 the spawning algorithm required an actual air block to start in, but mobs could always spawn in hitboxless blocks.

To test this, I used a superflat world with the following generator:

3;minecraft:bedrock,3*minecraft:stone,5*minecraft:sandstone,4*minecraft:stone_button:5;2;

minecraft:stone_button:5 is a floor button, but the orientation doesn't matter for this. I put 4 layers buttons there. The world looks pretty trippy:

ButtonlandMore buttonland

A quick /time set 18000 and mobs start spawning almost immediately, even though there are no solid surfaces not covered in 4 layers of buttons.

Mobs spawning in buttonland

This is also true for buttons over rails:

3;minecraft:bedrock,3*minecraft:stone,5*minecraft:sandstone,minecraft:rail,minecraft:stone_button:5;2;

Mobs spawning on rails under buttons

Note: While these are overworld mobs, I have no reason to assume that it'd be any different for zombie pigmen, seeing that they don't follow any special spawning conditions.

1
  • 2
    The spawning algorithm may need air blocks to start so if you fill the entire world with buttons it may not spawn mobs.
    – Moddl
    Commented Nov 3, 2015 at 2:00
4

For anyone wondering, mobs can not spawn on buttons in 1.9. The previous answer was from 2015, before 1.9 was released.

According to snapshot 15w46a for update 1.9 that was released in 2016:

  • Mobs can no longer spawn inside blocks that block movement but are transparent, such as leaves.

  • Mobs can no longer spawn in blocks containing rails, powered rails, detector rails, or activator rails.

  • Mobs can no longer spawn in blocks containing buttons, tripwire hooks, pressure plates, levers, redstone torches, redstone repeaters, comparators, or redstone dust.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.