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

Cake is supposed to trigger the block destroyed event when its last slice is eaten, but it does not

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 21w05a, 21w06a, 21w10a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Plausible
    • Category:
      Game Events
    • Mojang Priority:
      Low

      Description

      The bug

      There's a function in CakeBlock.java that triggers the block_destroy game event if the last slice of cake is eaten:

      if (n < 6)
      {
        levelAccessor.setBlock(blockPos, (BlockState)blockState.setValue(BITES, n + 1), 3);
      }
      else
      {
        levelAccessor.removeBlock(blockPos, false); levelAccessor.gameEvent((Entity)player, GameEvent.BLOCK_DESTROY, blockPos);
      }
      

      However, this does not work correctly in game. If you eat the last slice of cake near a sculk sensor attached to a comparator, it will give a strength of 8, which is the normal eat event, instead of 13, which is the block destroy event.

      Relates to MC-213947

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              PancakeIdentity PancakeIdentity
              Votes:
              4 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: