Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-76490

Sheep can eat grass through non-full blocks



    • Bug
    • Status: Open
    • Resolution: Unresolved
    • Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.2-pre4, Minecraft 1.8.2-pre6, Minecraft 1.8.3, Minecraft 1.8.8, Minecraft 15w49a, Minecraft 15w49b, Minecraft 1.8.9, Minecraft 15w50a, Minecraft 16w05a, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.2, Minecraft 17w49a, Minecraft 17w49b, Minecraft 18w10c, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03b, Minecraft 19w03c, 1.14.4, 1.15.1, 1.15.2, 20w21a, 20w46a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w08b, 1.17 Release Candidate 2, 1.17, 1.17.1, 1.18.2, 22w11a, 1.19
    • None
    • Confirmed
    • Mob behaviour
    • Low


      The Bug:

      Sheep can eat grass through non-full blocks.

      Steps to Reproduce:

      • Set the "randomTickSpeed" gamerule to "0" to avoid grass blocks from converting into dirt as a result of blocks being present above them.
      • /gamerule randomTickSpeed 0
      • Summon a large area of grass blocks with some slabs above them.
      • /fill ~1 ~ ~1 ~15 ~ ~15 minecraft:grass_block
      • /fill ~1 ~1 ~1 ~15 ~1 ~15 minecraft:oak_slab
      • Spawn some sheep on top of the slabs and wait around thirty seconds.
      • Take note as to whether or not sheep can eat grass through non-full blocks.

      Observed Behavior:

      Sheep can eat grass through non-full blocks.

      Expected Behavior:

      Sheep would not be able to eat grass through non-full blocks.

      Code Analysis:

      Code analysis by TriWonder81 can be found below.

      The following is based on a decompiled version of Minecraft 1.16.5 using MCP mappings.

      At net.minecraft.entity.ai.goal.EatGrassGoal in the tick method the block below the sheep is checked but the block the sheep is currently in is not checked. This could be fixed by adding a check to make sure the sheep is in either air or a walkable block.


        1. 2015-12-06_18.18.17.png
          155 kB
        2. 2015-12-06_18.19.26.png
          191 kB
        3. MC-76490.mp4
          4.22 MB

        Issue Links



              Unassigned Unassigned
              Avoma Avoma
              11 Vote for this issue
              11 Start watching this issue