The bug
You can interact with cake in creative mode or when your hunger bar is full.
Fix
BlockCake.java
/**
* Called when the block is right clicked by a player.
*/
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
// Comment: Replaced this
//if (!worldIn.isRemote)
//{
// return this.eatCake(worldIn, pos, state, playerIn);
//}
//else
//{
// ItemStack itemstack = playerIn.getHeldItem(hand);
// return this.eatCake(worldIn, pos, state, playerIn) || itemstack.isEmpty();
//}
return this.eatCake(worldIn, pos, state, playerIn);
}
Related issues
relates to
Attachments
Comments

Still an issue in 16w40a.

Affects 18w22c

Affects 1.13-pre1

Affects 1.13-pre2

Affects 1.13-pre3

Affects 1.13-pre4

Affects 1.13-pre5

Affects 1.13-pre6

Affects 1.13-pre7

Affects 1.13-pre8

Affects 1.13-pre9

Still affecting the full release of 1.13

Affects 18w31a

Affects 18w47a

Affects 18w48a

Affects 18w48b, can I request ownership of the ticket?

Affects 18w49a

Affects 18w50a

Affects 19w13b, can I request ownership?

Affects 19w14a

Affects 19w37a

Fixed in 19w42a. A bug remains with cake that is better described in MC-114718.

Can we have it so that we can eat cake in creative mode please?
When building with redstone in hexadecimal, cakes are way less laggy than Block Entities and having to switch to survival, put a hunger affect on and then eat the cake is really really slow
Most servers dont allow /effect or /setblock - So it has to be done manually