pmmp/PocketMine-MP

Client thinks player can eat regular apples without being hungry

Closed this issue · 1 comments

Issue description

When the player has full hunger in difficulty easy/normal/hard, it should not be able to eat anything with a full hunger bar.

This appears to be correctly enforced by the server, but an eating animation is played even though the item doesn't get consumed.

It looks like a protocol change is probably responsible for this, as the correct flags appear to be set. The bug doesn't reproduce in vanilla.

Steps to reproduce the issue

  1. Go into survival with max hunger
  2. Eat an apple

OS and versions

  • PocketMine-MP: 93a9007
  • PHP: 8.3.4
  • Using JIT: no
  • Server OS: windows
  • Game version: windows

Plugins

Reproduces without plugins

Turns out this is a bug in vanilla: https://bugs.mojang.com/browse/MCPE-178647

Thanks to @Sandertv for the assist in identifying the problem