Fix deploying food missing particles and not returning the correct items (#7288)

* fix particle when deploying last food in stack

* Bowl foods deployer fix
This commit is contained in:
Cody 2025-01-27 09:25:06 -06:00 committed by GitHub
parent e2b65fd53c
commit 2cf08a1231
Failed to generate hash of commit

View file

@ -184,8 +184,9 @@ public class DeployerHandler {
if (stack.isEdible()) {
FoodProperties foodProperties = item.getFoodProperties(stack, player);
if (playerEntity.canEat(foodProperties.canAlwaysEat())) {
playerEntity.eat(world, stack);
player.spawnedItemEffects = stack.copy();
ItemStack copy = stack.copy();
player.setItemInHand(hand, stack.finishUsingItem(world, playerEntity));
player.spawnedItemEffects = copy;
success = true;
}
}