mojira.dev
MC-110067

Bat spawn egg spawns bat inside non-full block

Bat spawn egg spawns bat inside non-full block.

Affected blocks:

  • Soul sand

  • Honey block

  • Farmland

  • Drit path

  • Snow layers 8

  • Slab

  • Sea pickle

  • Big dripleaf

  • Chorus plant

  • Chest

  • Trapped chest

  • Ender chest

  • Cactus

  • Chain(axis: x, z)

  • Enchanting table

  • End portal frame

  • Flower pot

  • Skull or head

  • Grindstone

  • Stonecutter

  • Bell

  • Lantern

  • Soul lantern

  • Campfire

  • Soul campfire

  • Candle

  • Small amethyst bud

  • Medium amethyst bud

  • Large amethyst bud

  • Amethyst cluster

  • Pointed dripstone

  • Hopper

  • Lectern

  • Daylight detector

  • Turtle egg

  • Conduit

  • Cake

  • Brewing stand

  • Mud

  • Sculk shrieker

  • Sculk sensor

  • Carpet

  • Moss carpet

  • Flower pot

  • Lightning rod(facing: east, west, north, south)

  • End rod(facing: east, west, north, south)

  • Calibrated sculk sensor

Use the following command:

Bat(Reconfirmed in 19w14a)

/give @p bat_spawn_egg{EntityTag:{id:"minecraft:bat",NoAI:1b}} 1

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

For bats the method net.minecraft.entity.passive.EntityBat.onUpdate() is causing this which sets their y position to floor(y) + 1 - height if it is hanging.

Linked issues

Attachments

Comments 19

This issue relates to MC-108226.

Removed gamemode because you can use spawn eggs in survival mode as well

Since shulkers and bats could be different issues, decided to split the ticket.

Now this ticket is only about bats.
Shulker is MC-174876.

Also applies to farmland and grass paths.

9 more comments

Can confirm in 1.17.

Can confirm in 1.18.

Can confirm in 1.18.1.

Can confirm in 1.18.2.

Can confirm in 21w11a. This same concept can also be seen with mud.

[Mod]Les3awe

(Unassigned)

Confirmed

Platform

Low

Block states, Mob spawning

Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, ..., 25w09b, 1.21.5 Release Candidate 1, 1.21.5, 25w17a, 1.21.6 Pre-Release 3

Retrieved