mojira.dev
MC-113981

All mobs require two non-full cube blocks to be spawned even if the mob is not two blocks tall

The bug

All mobs require two non-full blocks to be spawned naturally even if the mob is only one block tall.

How to reproduce

  1. Create a Superflat world with the following preset

    minecraft:stone,minecraft:air,minecraft:stone,minecraft:stone_slab
  2. Use for example the /say command to list all entities

    /say @e[type=!player]

    → No entity is listed

  3. Replace some blocks with non-full cube blocks like slabs

    /fill ~ ~-1 ~ ~170 ~-1 ~170 stone_slab

    :info: Note how the available space is still one air block, but now the block above it is a non-full block (stone slab)

  4. Use the /say command again

    /say @e[type=!player]

    → Bats and spiders are listed

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The method net.minecraft.world.WorldEntitySpawner.canCreatureTypeSpawnAtLocation(SpawnPlacementType, World, BlockPos) tests for all mobs for two non-full cube blocks, regardless of the mob size. The same applies to water mobs in this method as well.

Attachments

Comments 5

Cannot reproduce for 1.13.1, seems to be fixed. Can anyone else reproduce?

1.13.1 preset: minecraft:stone,minecraft:air,minecraft:stone,minecraft:stone_slab;minecraft:plains;

Just tested the 1.13.1 preset, still seems to be an issue.

This also happens for bats, which doesn't make sense at all.

Can't reproduce in 1.18.1

Can still reproduce this, however one of the reproduction steps was incorrect; I have fixed it now.

marcono1234

(Unassigned)

Confirmed

Mob spawning

block, cube, full, mob, size, spawn

Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.13.1, 1.16.3, 1.18.1, 1.21.1, 24w39a

Retrieved