mojira.dev
MCPE-47598

Raids Can Spawn On Any Block, Anywhere

Raids do not care what they spawn on, they can spawn on any block in the game. This goes for all members of a raiding party. This makes raids spawn in ridiculous places, along with making raids nearly impossible to prevent, or spawn proof against.

Raiders will ever spawn in places that deal damage to them, like in one block tall areas, so as soon as they spawn, they just suffocate and die. They also have no issue spawning in things like fire, lava, or magma blocks.

Its not even limited to blocks or things with collision boxes. They can spawn on floating redstone dust, buttons, torches, and even repeaters.

The only thing found that they don't spawn on, is scaffolding. Which is a life saver.

Below is a list of blocks tested, that they can absolutely spawn on. You can also find a world download below, for all your raid testing needs. Its a void world, so you don't need to worry about spawn proofing. All commands are provided. The world is also a perfect example of raids spawning below ground MCPE-45183

You can also find a full demo of this bug here: https://youtu.be/ymgbqpCAOMQ

Blocks tested:
Glass
Bedrock
Beacons
Magma Blocks
Lava
Fire
Lower Slabs
Barrier Blocks
Fences
Walls
Stairs
glass panes/iron bars
Hoppers
carpet
buttons
torches
repeaters
redstone
The list goes on and on and on

Linked issues

Attachments

Comments 26

Possibly relates to MCPE-45183

silentwisperer

Oh for sure, both of these issues need to be addressed:3

Super annoying. Have you guys looked into this yet?

I can't seem to reproduce this for anything but stone in 1.16, mostly fixed i guess.

Can anyone else confirm that it's been fixed?

16 more comments

Auldrick: Two replies:

Re: anchor points

Your concept of the anchor point is surely correct, but your theory on how that works can be shown to be incorrect by testing. The anchor point and any scatter points must satisfy the same block checks. The anchor point is chosen first, and then a search is made for scatter points using the same block criteria. If there is only one spawnable block, then the entire wave spawns together on that block (like an environmental herd spawn). The search range for scatter points appears to be 4 blocks in each direction.

You can use

[media]

to test spawn mechanics and spawnable blocks. It consists of a 150x150 smooth stone platform at Y = 149, and above that a single-bed village encased in leaves. Command blocks on top of the leaves allow you to place blocks for testing across the platform at Y = 150 ("Low Block Fill") and 151 ("High Block Fill"), as well as above the leaf structure ("Ceiling"). Another command block is used to start raids, and a repeat-chain command block pair marks raid spawns with soul campfires and instantly kills them.

If you want to see what I mean about anchor and scatter points, try these tests:

  • Set "Low Block Fill" to leaves, "High Block Fill" and "Ceiling" to air, and then place one solid block above the leaf structure. Whole waves will spawn on that block. (Some waves may fail to find it; just start another raid if that happens.)

  • Set "Low Block Fill" to leaves, "High Block Fill" and "Ceiling" to air, and then place a few scattered solid blocks above the leaf structure with leaves in-between the scattered blocks. Waves will spawn on the scattered solid blocks but not on the leaves between them.

  • Set "Low Block Fill" to lava, "High Block Fill" and "Ceiling" to air, and spawn raids. Waves will spawn in the lava with typical scattering.

Re: the spawn_groups json files

I think these probably are being used, but they simply don't fully expose the raid spawn rules. Many mobs have special hard coded spawn rules that work "behind the scenes" of the exposed .json rules, or in spite of them. For example, magma cubes skip the block collision test that most mobs use (MCPE-46540), but they check for entity collisions unlike other mobs (thus armor stands are used to block magma cubes in fortress farms). Even the general environmental spawning algorithm has a block check for slabs that is not exposed as a block filter in any mobs' spawn rules json. So the fact that the spawns_on_surface filter does not always apply for raid waves does not mean that the file as a whole is unused.

There is, in fact, a part of the anchor spot search procedure that uses the same kind of top-to-bottom search for a surface spawnable spot as environmental spawning. However, this part only kicks in if the game first fails to find a spawnable spot around the village near the village's own Y-level:

  1. The game first looks within 32-56 blocks horizontal and 18 blocks vertical of the village center for a spawnable spot. (The vertical range of was tweaked in 1.16.200.51 beta; it used to be 16 blocks.)

  2. If step (1) fails, then the game searches from the top of the world downward for a spot within a 32x32 horizontal square around the village's horizontal center.

We cannot overwrite the vanilla spawn groups with a behavior pack to test changing the rules in them. In the absence of a conclusive test, it seems probable to me that the those files are being used at the points in the raid wave spawning algorithm that match what they state.

(Note: everything I'm stating here is based on extensive testing by myself or others. I've seen some code-digging done on raid spawning but the results were pretty vague and only suggest the game uses several block search algorithms to check for spawnable locations and checks around 50 spots for each wave.)

Affects 1.17.40.20

Affects 1.19.21

Affects 1.19.40

Mrthechicken102

affects 1.20.40

 

silentwisperer

(Unassigned)

223554

Confirmed

Windows

window 10

1.19.70.24/25 Preview, 1.16.210.57 Beta, 1.16.100.56 Beta, 1.16.100.55 Beta, 1.13.0.13 Beta, ..., 1.20.32 Hotfix, 1.20.41 Hotfix, 1.20.51 Hotfix, 1.20.62 Hotfix, 1.20.81 Hotfix

Retrieved