mojira.dev
MC-92609

Mobs no longer spawn in blocks with various redstone components

Mobs will no longer randomly spawn if either the block being spawned in or the block above that contains any of the following: buttons, tripwire hooks, pressure plates, levers, redstone torches, redstone repeaters, comparators, redstone dust.

It's not clear whether this was an accidental change with the other changes to mob spawning, and it breaks some things, so filing it to be looked at.

Reasoning it might be accidental: in MCP terms, the old logic allowed spawning if !isNormalCube(), which expands to !(isOpaque() && isFullCube() && !canProvidePower()). New logic is !isSolidFullCube() && !canProvidePower(), which expands to !(blocksMovement() && isFullCube()) && !canProvidePower(). They might have meant that to be !(blocksMovement() && isFullCube() && !canProvidePower()) (note moved paren), just swapping the isOpaque() for blocksMovement(), and got confused like I initially did with the double-negative on canProvidePower().


Code analysis by @unknown can be found in this comment.

Linked issues

Comments 38

This is a direct result of the fix for MC-64492.

Sigh. Given the fact that MC-64492 as filed doesn't say anything about where mobs actually spawn (it's about where the pack can start trying to spawn) and the fix for it introduced new, different spawn restrictions without correcting the situation described in the report itself without any statement as to what was intended to be changed, I find it impossible to determine what is an intentional result of the fix for that bug and what is accidental. If you heard that it was intended from a Mojangsta you should say so, otherwise let's let a Mojangsta say whether it's "works as intended".

As I originally explained, it's entirely plausible that the intended result was to change "isOpaque" to "blocksMovement" (to prevent spawning within leaves, grass, cactus, and so on) and to add rails (the real new logic is more like !(!isSolidFullCube() && !canProvidePower() && !isLiquid() && !isAnyKindOfRail()) but I didn't want to get into all the extra detail to avoid confusing people), and the change to prevent spawning within a large number of redstone components was an unintentional "direct result" due to a mistake in refactoring the code.

I would also like to see confirmation from Mojang that it is intended that mobs no longer spawn on pressure plates. The fix for MC-64492 seems to be trying to revert to previous spawning behavior, whereas not spawning on pressure plates is new behavior, and breaks many popular farm designs. Mojang can of course change the game any way necessary, including breaking mob farms, but let it at least be intentional?

Hmm seems I was mistaken with the reports, and after doing some testing I can confirm. The original behaviour would use air blocks as starting points for the spawn cycle, but mobs could spawn on blocks with rails and such. The bugged behaviour caused the starting points to include blocks that are opaque (rails and such). With that bug fix, these are now all limited to air.

Confirm mobs not spawning on pressure plates in 15w47a

28 more comments

Put the dust on top of glowstone. Wouldn't work if you need to QC-power something below the dust as well, but should work for other cases.

Did you ever intended to mention redstone components in spawn code?
If yes, than you need to check if it ACCUALY provides signal, not if it CAN.
If no, than simply remove the check.

I personally hope that this is going to be a feature but not a bug: it makes building redstone machines in the nether much more convenient since zombie pigmans will not be able to spawn. I don't think it's necessary for mobs to be able to spawn on redstone components.

Please strongly consider leaving this the way it is, at least for redstone dust. It's a huge pain to build redstone circuits in the nether when mobs can spawn on the redstone dust. There are some circuits where it is not possible to place a block over the dust (for example, when propagating a signal downward using torches and dust, the two blocks above the block supporting the dust are occupied by the dust, and the torch immediately above it). 

 

Having to work around mobs spawning on redstone dust when building in the nether is unnecessarily limiting. Also, to whoever suggested putting redstone dust on glowstone, that won't work if you need the block to be powered (as with the downward torch tower I already mentioned). 

 

As for the other blocks mentioned, repeaters and comparators have a solid hitbox, so mobs shouldn't be able to spawn on them regardless. 

Anomie X

(Unassigned)

Confirmed

(Unassigned)

Minecraft 15w46a, Minecraft 15w47a, Minecraft 16w02a, Minecraft 16w03a, Minecraft 16w04a, ..., Minecraft 16w15a, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10.2, Minecraft 1.11

Retrieved