ArqadeIs there a way to keep Zombie Pigmen off of minecart tracks in the Nether?
[+54] [11] Jason Plank
[2011-05-30 03:33:14]
[ minecraft ]
[ ]

I am building a 2x3 tunnel for rapid travel (via minecart) through the Nether. The tunnel, in cross-section, looks like this:

 NN     N = Glass
N  N    X = Cobblestone
N_iN    i = Torch (alternating Redstone and regular torches, spaced out a bit)
NXXN    _ = Minecart track (alternating powered/unpowered)

I have read this question [1] and the prevailing answer there basically says not to mind the Zombie Pigmen. For me, that isn't an option because Pigmen can be a bit of a showstopper to minecarts in my tunnel.

pigmen party screenshot

They spawn in the tunnel, as opposed to walking into it (this seems to be consistent with the Wiki article on Zombie Pigmen [2], which merely says they can spawn at "any light level". They're a problem because they appear in groups of 2-3 and prevent minecarts from moving along the track.

I have thought of a few possible ways to deal with this:

There's also this design, found in a Minecraft Forums thread [3]:

N    N = Glass
_    _ = Track
X    X = Cobblestone

Nobody can spawn (or walk) on your track, and the glass also keeps you from attracting ghasts. It's very relaxing riding across the netherscape in the apparent open, watching ghasts fly about overhead unaware of your presence.

I haven't yet tested it, but I would hesitate to embrace this design, as it seems like it's an exploit that is liable to be "fixed" in any given future update. (I just re-did about 4 km of track that was previously powered by exploiting the minecart collision bug/feature, and I do not want to go through that kind of thing again.)

Is there any non-exploit, modless way to keep my tracks clear of Pigmen? I should add that this is in the context of SMP, and I don't want to turn spawn-monsters off either.

this sounds like a bug if you ask me, maybe getting it posted in the wiki or twitter will get notch's attention - Mark Hosang
(13) Perhaps some sort of horribly expensive, time consuming trap system where minecarts going over detector rails trigger arrow-equipped dispensers that constantly flood the track in front of the minecart with arrows, thus killing any foreign matter on the track. - Resorath
Unfortunately, the only valid answers (as of 1.6.6) to this question are in the question already. The only guaranteed way to keep your tracks in the nether clear are to use the glass (or stair or slab) trick right above the track as Zombie Pigmen only need a 1x2 area to spawn in and ignore rails torches and the like. - James
[+15] [2011-05-30 11:21:22] fjdumont

I would prefer using half steps / slabs over fredley's solution. The are low in cost, and look nice in most situations.

What do you mean be one slab each second block? If there are any uncovered opaque blocks with space above them then pigmen can spawn there. - fredley
And could they spawn on a block with a torch on it ? - Djorak
+1 for simplicity. With this solution, you don't need to destroy any existing blocks, just move down the track placing a half-step on any exposed cobblestone and you're in the clear. - Alain
@fredley: I rechecked it - of course, every block needs to be replaced by slabs. Post has been edited - fjdumont
@Djorak - No, since the block is 'occupied' by the torch. - fredley
(4) @fjd if information is not accurate or wrong, just remove it. Leaving it there, but struck out, can be confusing, and if anyone actually cares about the edit history, they can always look at it. - Nick T
(1) They will still spawn on the track, and track can not be put down upon slabs to make the gap over their head 1.5 instead of 2. - James
[+13] [2013-07-14 08:24:08] IQAndreas [ACCEPTED]

Since version 1.5, this hasn't been much of an issue, as that release introduced a rule in the mobs' AI to avoid rails unless they are chasing after the player. Although I have still found Zombie Pigmen appearing on the tracks, this is now not as much of an issue as it was in previous versions.

Zombie Pigmen are able to spawn on rail tracks, so removing the walking path on the side will do nothing. But as has been mentioned, adding blocks above your tracks will prevent them from spawning and help keep them from walking onto your tracks 100% of the time. This is a common "fix", and has been around for quite a while, and it doesn't seem like the developers have any plans to stop this fix from being possible.

The following blocks can safely be placed above the tracks, and will not suffocate you:

  • Glass panes (I would really recommend this one, since they are "cheaper" than glass blocks, works with stained glass panes as well)
  • Glass blocks (works with stained glass as well)
  • Glowstone blocks
  • Leaf blocks
  • Iron bars
  • Fences (of all materials)
  • Half-slabs (of all materials, note that they must be single, NOT double slabs)
  • Stairs (of all materials)
  • Trap doors
  • Pistons (both extended and retracted)

There are other blocks that would work, such as Beds, Chests, TNT, or Enchantment Tables, but I have excluded them from the list due to being impractical.

(1) Half slabs are probably the most appropriate as they will prevent mobs spawning on top of them as well. - angussidney
[+7] [2012-02-11 03:14:26] Pestilence

The way to ensure no pigmen spawn on your nether rail is to place glass above the rail. This is not a bug/exploit and will not be “fixed”. Glass is a transparent block and will not suffocate the riders, but you will need to clear out any areas you may wish to exit the cart at. If you need a walkway, build it beside the track using slabs/half steps (assumeing you need pigmen not to spawn on the walkway; they would still be unable to obstruct the minecart track even if allowed to spawn on the walkway).

As to powering the tracks, I would actualy recommend levers over torches. They are hidden if you are not committed to glass on the bottom layer.

 N     NN
X_X   X_ON
>XX   >X-X

> = Lever  O = Air  - = Slab/halfstep  N = Glass

Thanks for writing this up! I've been thinking that glass over the rails would be a solution for this question, but I hadn't gotten around to trying it out. Have you tested this? - Kevin Reid
[+5] [2012-09-14 09:15:54] iOlivier

In my opinion, the simplest way to avoid pigmen spawning is to place top-slabs above the rails. You can still go through and quit the minecart.

For slopes, I just discovered that the opened fence gates above the rails do not stop the minecarts. Edit : after some tests, pigmen can spawn in open fence gates :-(

[+3] [2011-05-31 00:03:36] Scott Chamberlain

Use a lava trench instead of the regular torches instead for light. This will make one less space for the pig-men to spawn and there is a good chance they will accidentally walk in to it and kill themselves. The only (possible) problem could be is you inventory could get filled up with rotten flesh from pig-men who died on the tracks.

(11) ZPM aren't very effected by lava and walk in and out of it. Not a great solution =/ - Pureferret
(1) Also they don't drop pork, but rotten meat, because they are Zombie Pigmen, not Pig Zombiemen. - andronikus
(1) @andronikus At the time this was written what I said was true for ZPM, it has changed seance then. - Scott Chamberlain
Ah, my bad. I see that was a while ago. - andronikus
[+1] [2012-01-10 19:16:41] Pureferret

Set up a series of pressure plates to activate pistons that drop down over the track with another piston attached that push the pigment out of the way, then retract. It would be complicated and involved, but it should work, even for diagonal pieces.

I've done this, and it is both complicated and expensive in terms of redstone and pistons, but it absolutely does work. However, I've not figured out a design for doing this on a diagonal track. - Fambida
[0] [2012-06-30 21:10:16] Bailey

I am having the same problem and it appears there is still no solution. I have found that using Worldguard provides limited help in staving off ZPN. You can make the tunnel a polygonal region that does not allow ZPN spawning. Issues with this idea are:

  • the original poster may not wish to use a plugin such as Worldguard
  • if the track has several turns, it can be difficult to make it into a single region, creating a mess of regions to cover the whole track
  • this is not a vanilla Minecraft method, so it is sort of an "exploit" or "cheating"

(6) Don't worry about necroing. That's no problem here. - John the Green
[0] [2013-07-14 07:45:05] user51803

By far the best way is to have a design like this:

Minecart Track ontop of any block. The space above the minecart track should have a slab upside down. This means the pigmen can't spawn, but you won't be hurt going through the track.

[-2] [2011-05-30 20:10:06] runaros

AFAIK there are (as of 1.6.5) no ways to prevent pigmen from spawning in tunnels without exploiting the glitch you are referencing from the forum thread. Considering that the Nether now works for SMP this becomes a real concern, and I'm frankly a bit surprised that notch hasn't made it so pigmen can't spawn on rails.

This should be a comment, not an answer. - Anonymous Pi
[-5] [2012-04-26 12:29:22] None ya

Change the difficulty to peaceful. Zombie Pigmen don't spawn on peaceful difficulty.

(5) This is a viable solution, but the asker clearly stated that he doesn't want to disable monster spawning, so this doesn't actually answer the question. - GnomeSlice
[-6] [2011-11-30 20:56:28] Dan

1.0.1 -- still no way to fix this. Regarding the trench idea, currently ZPM will avoid the trench, but walk into it, and then try to jump out again when they fall.

A very easy fix would be to change the spawning conditions for light levels. Place your torches/glowstone along your line -- no zombie pigmen.

(4) Zombie pigmen can spawn "at any light level" in the nether... - Unionhawk