mojira.dev
MC-106826

Can interact with (eat) cake in creative mode/hunger bar is full

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

Attachments

Comments

migrated
[media][media]
[Mod] Neko

Still an issue in 16w40a.

muzikbike

Affects 18w22c

muzikbike

Affects 1.13-pre1

muzikbike

Affects 1.13-pre2

muzikbike

Affects 1.13-pre3

muzikbike

Affects 1.13-pre4

muzikbike

Affects 1.13-pre5

muzikbike

Affects 1.13-pre6

muzikbike

Affects 1.13-pre7

muzikbike

Affects 1.13-pre8

muzikbike

Affects 1.13-pre9

muzikbike

Still affecting the full release of 1.13

muzikbike

Affects 18w31a

muzikbike

Affects 18w47a

muzikbike

Affects 18w48a

muzikbike

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

muzikbike

Affects 18w49a

muzikbike

Affects 18w50a

muzikbike

Affects 19w13b, can I request ownership?

muzikbike

Affects 19w14a

muzikbike

Affects 19w37a

muzikbike

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

RedCMD

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

[Mod]Les3awe

coschevi

Confirmed

Player

cake, eat, hunger, interaction, survival

Minecraft 1.10.2, Minecraft 16w33a, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w38a, ..., 19w34a, 19w35a, 19w36a, 19w37a, 19w39a

Minecraft 16w40a, 19w42a

Retrieved