-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3, 1.14.4, 19w34a, 19w35a, 19w36a, 1.15 Pre-release 1, 1.15 Pre-release 7, 1.15, 1.15.2, 20w18a, 20w22a, 1.16.1, 1.16.2 Release Candidate 1, 1.16.3, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 21w15a, 1.17, 1.17.1 Release Candidate 1, 1.17.1, 1.18.1
-
None
-
Confirmed
-
Mob spawning
The bug
Both mobs and pillagers from outposts spawning is affected by block light level, but pillagers from outposts spawn at block light levels 8 or less instead of 7 or less (prior to 1.18) or 0 like other mobs.
How to reproduce
Use the seed 7703073064123265302 and run the following commands:
- Teleports to pillager outpost.
/tp @p 1175 65 855
- Sets the world border to restrict spawning area.
/worldborder set 63
- Centers the world border.
/worldborder center 1175.5 855.5
- Removes terrain.
/fill 1144 85 824 1206 64 846 air
- Removes more terrain.
/fill 1206 72 847 1144 64 886 air
- Places platform for pillagers and mobs to spawn on.
/fill 1206 64 824 1144 64 886 polished_blackstone
- Sets block light level to 7.
/fill 1206 73 824 1144 73 886 minecraft:shroomlight
- Clears pillagers and mobs.
/kill @e[type=!minecraft:player]
Notice that both pillagers and other mobs are spawning, as the light level is 7.
- Sets block light level to 8.
/fill 1206 72 824 1144 72 886 minecraft:shroomlight
- Clears pillagers and mobs.
/kill @e[type=!minecraft:player]
Notice that even though the light level is 8, pillagers are still spawning.
- Sets block light level to 9.
/fill 1206 71 824 1144 71 886 minecraft:shroomlight
- Clears pillagers.
/kill @e[type=!minecraft:player]
Notice that nothing spawns, as the light level is 9.
Code analysis
1.16.2-rc1, Mojang names
net.minecraft.world.entity.monster.PatrollingMonster.checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster>, LevelAccessor, MobSpawnType, BlockPos, Random) allows light level <= 8.
net.minecraft.world.entity.monster.Monster.isDarkEnoughToSpawn(ServerLevelAccessor, BlockPos, Random) allows light level <= Random.nextInt(8) which is 0-7 (both inclusive).
- is duplicated by
-
MC-246453 Pillager can spawn at light level 7
- Resolved