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);
}
Linked issues
relates to 2
Attachments
Comments 23
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
Still an issue in 16w40a.